Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
Pradeep160
Frequent Visitor

Field parameter with switch

Hey Power BI Community, 

I am currently working with a Matrix visual where I have placed a field parameter, which we can call Parameter1, in the values section. This parameter is created by combining five measures in a specific sequence.

I have received a new requirement to add a switch on the page with two options: Option1 and Option2. By default, Option1 is selected, and with this selection, Parameter1's output should be displayed on the matrix. If the end user selects Option2, I need to display a different field parameter, which we can call Parameter2, consisting of another set of five measures, on the same matrix visual.

I would like to achieve this without using Bookmarks. I have tried several solutions but have not had any success so far. Any assistance or suggestions would be greatly appreciated. Thank you in advance for your help

1 ACCEPTED SOLUTION
danextian
Super User
Super User

Hi @Pradeep160 

 

Add all fields to the same field parameters table then add a calculated column that groups this parameter fields.

danextian_0-1737120004862.png

danextian_1-1737120026187.png

danextian_2-1737120041627.pngThe calculated column and field parameters can be used together in the same slicer, but they should not be used together in a matrix or table because grouping will not be applied. Essentially, these parameter fields are still measures that have not been materialized in a disconnected table using a conditional measure (the old-school approach for switching between measures based on slicer selection). If you do, the result will be as below:

danextian_3-1737120343012.png

 

 










Did I answer your question? Mark my post as a solution!


Proud to be a Super User!









"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.

View solution in original post

2 REPLIES 2
danextian
Super User
Super User

Hi @Pradeep160 

 

Add all fields to the same field parameters table then add a calculated column that groups this parameter fields.

danextian_0-1737120004862.png

danextian_1-1737120026187.png

danextian_2-1737120041627.pngThe calculated column and field parameters can be used together in the same slicer, but they should not be used together in a matrix or table because grouping will not be applied. Essentially, these parameter fields are still measures that have not been materialized in a disconnected table using a conditional measure (the old-school approach for switching between measures based on slicer selection). If you do, the result will be as below:

danextian_3-1737120343012.png

 

 










Did I answer your question? Mark my post as a solution!


Proud to be a Super User!









"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.
Ritaf1983
Super User
Super User

Hi @Pradeep160 
If I understood you correctly you can use the grouping of field parameters like in the linked video :
https://www.youtube.com/watch?v=qlhcN3A0HNU

if not 

Please share sample data (excluding sensitive information) in text format, along with your expected result and any relevant logic. For guidance, refer to

How to provide sample data in the Power BI Forum

If possible, upload a simplified .pbix file using this guide:

 How to upload PBI in Community

If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly.

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

Find out what's new and trending in the Fabric community.