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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
SUNNY_ISLAND
Frequent Visitor

Column total incorrect for converted amounts

I have the following dax formula to convert values from various currencies to SGD. The total column does not add up. Instead of showing $16.5m, it is showing $25.2m. The converted amount on each row is correct but not the total for the column. 
 
Appreciate advice on how to get the DAX
-----
Total value in SGD =
VAR
    _CURRENCY = MAX(Data[Report curr])
VAR
    _CONVERSIONRATE =
        calculate(max('Exch rate'[Exch rate]), 'Exch rate'[Report Curr] = _CURRENCY)
RETURN
    sumx(data,_CONVERSIONRATE*(Data[Value]))
----
 
2022-08-31_16-51-16.png

 

 

2 ACCEPTED SOLUTIONS
Anonymous
Not applicable

Anonymous
Not applicable

Hi @SUNNY_ISLAND ,

Please have a try.

Based on the measure[Total value in SGD].

_contract_ = 
var _b = SUMMARIZE('Date','Date'[Report curr],"aaa",'Data'[Total value in SGD])
return
IF(HASONEVALUE('Date'[Report curr]),'Data'[Total value in SGD],SUMX(_b,[aaa]))

Or you can use Other unique columns replace the column 'date'[Report curr].

 

If I have misunderstood your meaning, please provide a pbix file without privacy information and more details with your desired output.

 

Best Regards

Community Support Team _ Polly

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

4 REPLIES 4
Anonymous
Not applicable

Hi @SUNNY_ISLAND ,

Please have a try.

Based on the measure[Total value in SGD].

_contract_ = 
var _b = SUMMARIZE('Date','Date'[Report curr],"aaa",'Data'[Total value in SGD])
return
IF(HASONEVALUE('Date'[Report curr]),'Data'[Total value in SGD],SUMX(_b,[aaa]))

Or you can use Other unique columns replace the column 'date'[Report curr].

 

If I have misunderstood your meaning, please provide a pbix file without privacy information and more details with your desired output.

 

Best Regards

Community Support Team _ Polly

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Anonymous
Not applicable

Fowmy
Super User
Super User

@SUNNY_ISLAND 
Please try the following version:

Total value in SGD =
VAR _CURRENCY =
    MAX ( Data[Report curr] )
RETURN
    SUMX (
        data,
        CALCULATE (
            MAX ( 'Exch rate'[Exch rate] ),
            'Exch rate'[Report Curr] = _CURRENCY
        ) * ( Data[Value] )
    )
Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

Thanks for your suggestion but it is still not working. The end results remain the same. Would appreciate alternative suggestions. Much thanks 

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.