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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

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
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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