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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
GHerz
Frequent Visitor

New challenge for Dynamic Measures

Dear Power BI Experts,

I have searched through the community and other sources several time, but can't find a solution for below, there I appreciate any wise comment on this:

 

With Tabular editor I have managed to create calculation groups for

- Dynamic Measure Selection (allowing to switch between Revenue, COGS etc. using a slicer)

- "TimeInteligence" (allowing to switch the selected measure from YTD to MTD to QTD etc.

 

I found this all is well documented in several articles.

What I would like to achive now is the following:

 

1. I added a new datatable for selection of "LC" and "GC" (Local Currency and Group Currency)

2. Depending on the selection of "LC" or "GC" and also depending on the selected measure (e.g. "Revenue" or "COGS") I would like to dynamically use the related Measure (in this example "Revenue LC", "Revenue GC", "COGS GC" or "COGS LC").

 

For my understanding this would reduce the number of measures in my data modell by 50%, as I have most measures two times, for LC and GC.

 

Many thanks in advance for your helpful support,

best wishes, Gunnar

1 ACCEPTED SOLUTION
DataInsights
Super User
Super User

@GHerz,

 

You can get the selected Currency with SELECTEDVALUE:

 

SELECTEDVALUE ( CurrencyTable[Currency] )

 

You can identify the selected measure with ISSELECTEDMEASURE:

 

ISSELECTEDMEASURE ( [Revenue] )

 

Use these expressions in a SWITCH statement to determine which measure to use.





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

Proud to be a Super User!




View solution in original post

2 REPLIES 2
GHerz
Frequent Visitor

Thank you very much for your comments. That helped me understanding that I was on the right way (trying with switch) and then I found an error in my statements that I had overseen for a while ... Many thanks, Gunnar

DataInsights
Super User
Super User

@GHerz,

 

You can get the selected Currency with SELECTEDVALUE:

 

SELECTEDVALUE ( CurrencyTable[Currency] )

 

You can identify the selected measure with ISSELECTEDMEASURE:

 

ISSELECTEDMEASURE ( [Revenue] )

 

Use these expressions in a SWITCH statement to determine which measure to use.





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

Proud to be a Super User!




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!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.