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
hgnisnattart
Frequent Visitor

Dynamic Scenario Calculation Based on Dropdowns

Hi, I'm trying to create a measure that uses the appropriate rate based on the currency scenario selected. I have the following screenshot example with 2 different entities: Currency and Plan/Actuals. All columns for each entity are shown below. 

 

I've tried implementing a calculated column to apply the correct rate to the Plan/Actuals table using LookUpValue, but it only works when the currency scenario is hard coded:

Ex. Local Amt Rate = LOOKUPVALUE('Currency'[Rate], 'Currency'[Currency], 'Plan/Actuals'[Currency], 'Currency'[Period], 'Currency'[Period], 'Currency'[Currency Scenario], "End of 2019"))

 

 

Capture.PNG

 

(In case extra context is needed: If 'End of 2019' and 'Actuals 2019' are selected, it means I want the 2019 Actuals according to the exchange rates related to the end of 2019. So the calculation I'm looking for is (5000*0.77) + (4500*0.78)) 

 

Thank you!

 

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@hgnisnattart , try a new measure


sumx(Summarize(PlanActual, PlanActual[Sceniro], PlanActual[Currency], PlanActual[Period] , "_1" , calculate(max(Currency[Rate]),filter(Currency, Currency[Currency]=max(PlanActual[Currency]) && PlanActual[Period] = Currency[Period])) *sum(PlanActual[local Amount])),[_1])

View solution in original post

2 REPLIES 2
amitchandak
Super User
Super User

@hgnisnattart , try a new measure


sumx(Summarize(PlanActual, PlanActual[Sceniro], PlanActual[Currency], PlanActual[Period] , "_1" , calculate(max(Currency[Rate]),filter(Currency, Currency[Currency]=max(PlanActual[Currency]) && PlanActual[Period] = Currency[Period])) *sum(PlanActual[local Amount])),[_1])

@amitchandak , thanks so much! This is working great :). I'm definitely going to have to spend some time breaking down the calculation to understand what's going on, but it works perfectly. Thanks again!

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.