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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
hellfire45
New Member

Using a Parameter as a filter and in calculated measures

So I am coming from Tableau.

In Tableau you can create a parameter that can be effectively used as a drop down box for filtering a dashboard.

 

Then you can have calculated measures to say like IF PARAMTER A = "Qty" then (use a measure containing quantity) else

IF PARAMTER A = "Dollars" then (use a measure containing # Value) else etc etc etc

 

In other words, IF I filter the paramter to "Qty", because I am using that calculated measure described above, all the charts would show quantity as their values.  IF I filter the paramter to "Dollars" then all the charts show dollars, etc...

 

Any ideas as to how this is done in Power BI?  Thanks!

1 REPLY 1
v-juanli-msft
Community Support
Community Support

Hi @hellfire45 

Would you like this result?

Capture3.JPG

If so, create a table

Capture4.JPGCapture5.JPG

Then create a measure

Measure =
SWITCH (
    SELECTEDVALUE ( 'parameter table'[parameter to select] ),
    "Qty", [Measure_quantity],
    "Dollars", [Measure_value]
)

Capture6.JPG

Best Regards
Maggie
Community Support Team _ Maggie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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