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
zina-aziz
Frequent Visitor

Dynamic measure values based on slicer selection

Hi everyone,

 

I have a spreadsheet with hotel rates and locations as shown below:

Capture I.JPG

I require a measure which can switch between three options from a slicer (Ie: AUD, GBP, USD) using data from another table as shown below:

Capture II.JPG

So for example, if i create an average rate card, when i select different currencies, the figure in the card will adjust depending on the rates in the second table.

 

Is such a measure possible? If so, how would you go about creating it?

 

Any help would be much appreciated.

 

Zina

4 REPLIES 4
theov
Advocate II
Advocate II

You can create a parameter hosting the options with datatable, no need for relationship with other tables.
Have your measures ready for each option and then use SWITCH and SELECTEDVALUE together and nest your measures inside.

This video explains it in two ways thoroughly

https://www.youtube.com/watch?v=tljRYGz15PA

v-yuta-msft
Community Support
Community Support

HI zina-aziz,

 

Sure, you can create a measure based on the selected value in slicer. But you should build a relationship between the two tables. Which means there should be some same columns in the two tables and values in one of the column need to be unique.

Please refer to: https://docs.microsoft.com/en-us/power-bi/desktop-create-and-manage-relationships

 

Regards,

Jimmy Tao

quentin_vigne
Solution Sage
Solution Sage

Hi 

 

Here is a good example on how to do that

 

https://www.fourmoo.com/2017/11/21/power-bi-using-a-slicer-to-show-different-measures/

 

made by @GilbertQ

 

/Erik

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.