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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
ikhwan_tokenomy
Frequent Visitor

Incorrect Subtotal

Hi

I have a DAX for custom measure with the formula of

 

Prev Day User Asset USD Latest Rate = CALCULATE(sum('user daily asset'[amount_usd_latest_rate]),PREVIOUSDAY(Dates[Date]))

 


The DAX will give result like below. Where the prev day value of each day is correct, but on the subtotal of the month, its showing the previous day record of the first date instead of the SUM of all the prev day value.

How can this be fixed?

ikhwan_tokenomy_0-1662691708724.png

 



Thanks

1 ACCEPTED SOLUTION

Maybe this:

[Prev Day User Asset USD Latest Rate] =
sumx(
    values ( Dates[Date] ),
    calculate (
        SUM( 'user daily asset'[amount_usd_latest_rate] ),
        PREVIOUSDAY( Dates[Date] )
    )
)

 

View solution in original post

4 REPLIES 4
daXtreme
Solution Sage
Solution Sage

Hi @ikhwan_tokenomy 

 

What should the logic be behind this measure? How do you want to aggregate? You've not shown this... And please always remember that one picture is worth a thousand words 🙂

Hi @daXtreme 

I've edited my question to show an example. Hope it is clearer now

THanks

Maybe this:

[Prev Day User Asset USD Latest Rate] =
sumx(
    values ( Dates[Date] ),
    calculate (
        SUM( 'user daily asset'[amount_usd_latest_rate] ),
        PREVIOUSDAY( Dates[Date] )
    )
)

 

Thanks @daXtreme 

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

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