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
547 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 ...
New features in the Power BI November 2022 update Part three of a five-part series of blogs |
---|
This update includes the roll-out of field parameters, separate Y axes for small multiples and new DAX debugging functions - and a new colour for Power BI!
We've been creating our idiosyncratic monthly blogs on Power BI updates since November 2016, and also deliver online and classroom Power BI courses. |
It's always difficult knowing when to cover new Power BI features. As regular readers will know, I usually avoid blogging on new features until they emerge from preview, but what happens when a feature is still in preview but is turned on by default?
They may still be in preview, but they will be available in your updated Power BI unless you turn them off.
Because this will be such an important change for many of our clients (and because it's now universally available) I've decided to cover this new feature now.
Start by creating a new field parameter:
Choose this option from the Modeling tab of the Power BI ribbon.
Now give it a name, and say which fields it can represent:
Here I've called the parameter CategoryField, and stated that I can use it to choose between reporting by centre name, region name or town name. I've chosen NOT to add a slicer based upon this parameter to my page - yet.
This is the sort of thing this will give initially:
Initially if I create a chart based on the CategoryField parameter, it shows it by region (perhaps because it was the first value in the list?).
Here's what's in the field well for this chart:
We're summing quantity by whatever value has been chosen for the category field.
By default Power BI will create a slicer for you, but if you untick the Add slicer to this page box shown above you can create your slicer manually:
First choose to add a slicer as normal.
You should base your slicer on your parameter:
Choose to show your CategoryField parameter in your slicer.
Your report users can now choose what to show in your report:
Here I've chosen to show total sales by town, not region.
So how do field parameters work? When you created your parameter, this is what Power BI created in your report:
Power BI created a table with three columns: the name of the field as it appears in your slicer, the order in which it will appear in the list of parameters and the field which will be displayed if you choose this parameter.
You might think that you would be able to transform this data in Query Editor, but you can't:
You can't see the table underlying this parameter in Query Editor.
The reason you can't see this query in Query Editor is that it is in fact a calculated table created on the fly using DAX:
CategoryField = {
("RegionName", NAMEOF('Region'[RegionName]), 0),
("TownName", NAMEOF('Town'[TownName]), 1),
("CentreName", NAMEOF('Centre'[CentreName]), 2)
}
You can edit the names of the slicer values in a fairly obvious way without needing to understand what this DAX is doing.
Field parameters are thus a great way to create dynamic slicers without understanding how to write DAX. My only reservation is that Power BI now contains 3 things called parameters, none of which bears much relation to any of the others!
Parts of this blog |
---|
|
Some other pages relevant to the above blogs include:
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.