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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply

Currency expression not working

Hi All,

 

Can some one help me with the below expression. When i try to add this as measure the total value is gryed out.

Am i missing something in the formula?

 

Total Value(Selected Currency) = SWITCH(TRUE(),[Selected Currency]="NZD",SUM(Sheet1[Total Value]*[Selected Currency]),[Selected Currency]="USD",SUM(Sheet1[Total Value]*[Selected Currency]),SUM(Sheet1[Total Value]))
 
Switch.jpg

 

 

2 REPLIES 2
Anonymous
Not applicable

Hi @RanjanThammaiah ,

 

Could you please share the "Selected Currency" measure to us?

 

And I think the result of the "Selected Currency" is a string, not a rate, you may need to a rate to multiply the Total Value.

 

Aiolos Zhao

rajulshah
Resident Rockstar
Resident Rockstar

Hello @RanjanThammaiah,

Please try following:

Measure =
//Following statement gives "USD","NZD" etc
VAR SelectedCurrency = [Selected Currency]
//Following statement gives value of currency
VAR SelectedCurrencyValue =
    CALCULATE (
        MIN ( Sheet1[CurrencyValue] ),
        FILTER (
            Sheet1,
            Sheet1[Currency] = SelectedCurrency
        )
    )
RETURN
    SWITCH (
        SelectedCurrency,
        "NZD", SUM ( Sheet1[Total Value] ) * SelectedCurrencyValue,
        "USD", SUM ( Sheet1[Total Value] ) * SelectedCurrencyValue,
        SUM ( Sheet1[Total Value] )
    )

 

Please note that I have used my column names. You may need to change those.

 

Let me know if this doesn't work as expected.

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors