Forum Discussion

viralpatel21's avatar
viralpatel21
Helper II
5 years ago
Solved

Measure Grand total not matching

Hello team,

 

i have created a measure where the grand total should be £96656.89 but im getting a different grand total.

 

This is my measure :

GBPConverstion =
var convertgbp = CALCULATE(
SUM('FX Rates'[GBP_Avg]) * [Card Spend GBP],
USERELATIONSHIP(Presentment[Settlement Date],FeeDate[Date]),
USERELATIONSHIP(FeeDate[Months],'FX Rates'[Months])
)
var previousmonthfx = CALCULATE(
SUMX('FX Rates','FX Rates'[GBP_Avg]),
PREVIOUSMONTH(FeeDate[Date])
)
var previousmth = CALCULATE(
[Card Spend GBP] * previousmonthfx,
USERELATIONSHIP(Presentment[Settlement Date],FeeDate[Date]),
USERELATIONSHIP(FeeDate[Months],'FX Rates'[Months])
)
return
IF(convertgbp=BLANK(),previousmth,convertgbp)

 

 

please could you help

  • Please try this to get the correct total.  It references your existing measure.  Use it in place of your current measure in the visual.  

     

    New GBPConversion = SUMX(VALUES('Date'[Month]), [GBPConversion])

     

    Regards,

    Pat 

3 Replies

  • mahoneypat's avatar
    mahoneypat
    Microsoft Employee

    Please try this to get the correct total.  It references your existing measure.  Use it in place of your current measure in the visual.  

     

    New GBPConversion = SUMX(VALUES('Date'[Month]), [GBPConversion])

     

    Regards,

    Pat 

    • viralpatel21's avatar
      viralpatel21
      Helper II

      Thank you for this. That did work.

      However i really didnt want to call it to another measure. Is there a way, where i could have it all in one measure?

      • Icey's avatar
        Icey
        Community Support

        Hi viralpatel21 ,

         

        It may need to transform the measure into a table (virtual table) and use the table as a parameter in your measure expression.  Then sumx("the virtual table", [the transformed column]). If you can show me some data and I'll test for you.

         

         

        Best regards

        Icey

         

        If this post helps, then consider Accepting it as the solution to help other members find it faster.