Read our blogs, tips and tutorials
Try our exercises or test your skills
Watch our tutorial videos or shorts
Take a self-paced course
Read our recent newsletters
License our courseware
Book expert consultancy
Buy our publications
Get help in using our site
551 attributed reviews in the last 3 years
Refreshingly small course sizes
Outstandingly good courseware
Whizzy online classrooms
Wise Owl trainers only (no freelancers)
Almost no cancellations
We have genuine integrity
We invoice after training
Review 30+ years of Wise Owl
View our top 100 clients
Search our website
We also send out useful tips in a monthly email newsletter ...
Software ==> | Power BI (160 exercises) |
Topic ==> | Query editor (9 exercises) |
Level ==> | Harder than average |
Subject ==> | Power BI training |
This exercise is provided to allow potential course delegates to choose the correct Wise Owl Microsoft training course, and may not be reproduced in whole or in part in any format without the prior written consent of Wise Owl.
This exercise covers unpivoting data, changing data sources and more besides! To begin with, create a new report and load the data in the First Half.xlsx workbook.
User Query Editor to tidy up this data so that you have something like this:
You'll need to remove the top row, then make the new top row into the row headers.
Choose the following option to unpivot the monthly data:
Choose to unpivot the months of data.
After a bit of renaming, you should have this table in Power BI:
The start of the table of unpivoted data.
Use this to create a chart showing value by month:
The problem is that we want to sort the months correctly, but to do that you'll need to assign numbers to them.
Go back to Query Editor and add a conditional column:
The option to add a conditional column, returning the correct month number for each row.
This should give you something like this:
After painstakingly typing in the 6 possible conditions and results, you should have a column turning a month name into a number.
You might have found it easier to do a couple of conditions then edit the M formula for this step to add the other four (it's certainly worth having a look at it to see how easy it is to understand and amend).
You can now choose to sort your month names by number:
Choose this option to sort your month names correctly.
After checking your chart is sorting by the correct column, you should now have this!
The same chart, but with the correct sort order.
Oh dear - Wise Owl can only apologise. The exercise asked you to link to the wrong file. Change your M to refer to the file called Second half.xlsx (you'll need to go down your query steps making lots of editing changes to resolve errors), then check your chart still works:
After a lot of retyping in your query step formulae you should eventually get this chart!
Save your report as The knees of a bee, then close it down.
You can find other training resources for the subject of this exercise here:
Kingsmoor House
Railway Street
GLOSSOP
SK13 2AA
Landmark Offices
99 Bishopsgate
LONDON
EC2M 3XD
Holiday Inn
25 Aytoun Street
MANCHESTER
M1 3AE
© Wise Owl Business Solutions Ltd 2024. All Rights Reserved.