An Introduction to Field Parameters in Power BI

An Introduction to Field Parameters in Power BI

There’s a new preview feature in Power BI which is going to make report developers everywhere think two things 1) This is AMAZING and 2) I wish I had this years ago it would have made my life a lot easier! (For anyone that doesn’t know preview features are experimental new tools that come packaged with Power BI desktop but have to be enabled separately in the options panel until they’re made generally available.??

Field Parameters is the kind of new feature which doesn’t just add new functionality, but it creates a whole new world of options and flexibility. If you’re creating static reports that are less interactive, then this isn’t for you, but if you’re building a report which is dynamic and made to be clicked around on then this could change your whole development approach. But enough of the vague hyperbole, here’s what they are, and how you can use them immediately.?


What are Field Parameters?

Field parameters make it possible for users to dynamically change the measures or dimensions being analysed within a report. To give an example you could have a page with a visual, or a table. In this visual you’re analysing the revenue of the items you’ve sold by item type. Well with a click of a button you could change that to show you the net profit, then back to gross, then maybe a count of items sold instead. Why stop there you could even change it from ‘by item type’ to ‘by week’. That’s right this is giving you the possibility to swap in new facts and dimensions at the click of a button! Before you feel like this could be messy and that it’s like asking users to build their end reports this isn’t that, this is a curated experience with a few critical options and metrics available. Though theoretically you could add as many as you like.

Here’s an example from a manufacturing demo, see how both the visual and the table are changing completely.

No alt text provided for this image


How to Use

Fortunately, field parameters are very simple to implement but, as with many things they can be very powerful if mastered (and in Power BI that always means using DAX). I’m going to take you through the basics but if anyone wants to request a post on the advanced features just leave a comment. What I will do though is put some videos I found helpful at the bottom of the page.

1.?Enabled field parameters as a preview feature (This is required at the time this post was written)

No alt text provided for this image

2. Then, to create a new field parameter, you will need to hover over the top toolbar as shown below then click Modelling -> New parameter -> Fields:

No alt text provided for this image

3.?This will show the box shown below, add in a couple of dimensions that you’d like to switch between. (For now, stick with dimensions rather than facts/values. Dimensions being textual categories)

No alt text provided for this image

4. When you click create, you’re going to end up with what looks like a new measure in one of your tables. This can be added to or adjusted at any time so don’t worry too much if it’s not perfect

5. Build a visual on a page and add a slicer, use the new field parameter created in step 4 as the slicer values

6. That’s it! Repeat for your facts/values and voila the whole chart is dynamic.


Considerations

  • That slicer is going to affect the whole page (it’s just like any other slicer) so if you want to have this centred around one visual make sure you’re editing the interactions of the visual.
  • AI visuals and Q&A aren't supported with the feature.
  • There's no way for users to select "none" or no fields option. Selecting no fields in the slicer or filter card is the same as selecting all fields.
  • Currently you can't create parameters in live connection data sources, without a local model.
  • You can't use implicit measures (columns that Power BI thinks it can aggregate automatically) for now, so if you need an aggregated column as one of your fields, you need to create an explicit DAX measure for it. Read more about implicit vs. explicit measures.
  • Currently you can't use field parameters for drill-through or tooltip page.
  • Conditional formatting isn’t easily available (see attached video for workaround)

Part of the fun though is trying to find ways to achieve your goals even though on the surface it doesn’t appear to be possible, so if some of these considerations sound like they may make what you want to achieve more difficult then don’t give up, first take a look at a few forums and videos. Someone may have figured out a workaround already!

As always, it’s tempting to force new features into reports where they’re unneeded so always keep the reporting objective in mind!


Thank you for reading. Have you tried Field Parameters? How did you get on? Comment below, we would love to hear and answer any questions you may have.

Please share this article with anyone you think would find it useful and subscribe for more!


Helpful Resources

要查看或添加评论,请登录

INFuse Data Solutions的更多文章

社区洞察

其他会员也浏览了