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

Get inspired! Check out the entries from the Power BI DataViz World Championships preliminary rounds and give kudos to your favorites. View the vizzies.

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
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!

FebPBI_Carousel

Power BI Monthly Update - February 2025

Check out the February 2025 Power BI update to learn about new features.

March2025 Carousel

Fabric Community Update - March 2025

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

Top Kudoed Authors