Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago

incorrect Grand Total

My Dax is returning  incorrect Grand Total.  Can anyone help review or rewrite it. 

Demo =
IF (
    HASONEVALUE ( 'Report Currency'[Report Currency] ),
    SUMX (
        'Exchange Rates',
        SUMX (
            'Calendar',
            CALCULATE (
                VALUES ( 'Exchange Rates'[exchange_rate] )
                    DIVIDE (
                        SUM ( 'Daily Item Sales'[total_amount_home] ),
                        SUM ( 'Daily Item Sales'[qty_sold] )
                    )
            )
        )
    ),
    DIVIDE (
        SUM ( 'Daily Item Sales'[total_amount_home] ),
        SUM ( 'Daily Item Sales'[qty_sold] )
    )
)

6 Replies