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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
ronaldbalza2023
Continued Contributor
Continued Contributor

Year To Date Incorrect Total

Hi everyone, need help on this please.

 

I have monthly sales and a ytd measure however it is showing an incorrect total. Note that I have a month and year filter slicer. Thanks!

 

Here's my dax measure of YTD.

Sales YTD = 
CALCULATE([Total Sales],DATESYTD('Date'[Date]))

ronaldbalza2023_1-1638882736964.png

 

 

1 ACCEPTED SOLUTION
ronaldbalza2023
Continued Contributor
Continued Contributor

This link in the forum has the same question and answer.
Running Total By Month 

Running Total =
CALCULATE (
    [Total Sales],
    FILTER (
        ALL ( 'Date' ),
        'Date'[Financial Year] = MAX ( 'Date'[Financial Year] )
            && 'Date'[Date] <= MAX ( 'Date'[Date] )
    )
)

View solution in original post

4 REPLIES 4
ronaldbalza2023
Continued Contributor
Continued Contributor

This link in the forum has the same question and answer.
Running Total By Month 

Running Total =
CALCULATE (
    [Total Sales],
    FILTER (
        ALL ( 'Date' ),
        'Date'[Financial Year] = MAX ( 'Date'[Financial Year] )
            && 'Date'[Date] <= MAX ( 'Date'[Date] )
    )
)
v-xiaoyan-msft
Community Support
Community Support

Hi @ronaldbalza2023 ,

 

Does the replies above solve your problem? If it has been solved, please mark the correct reply as the standard answer to help the other members find it more quickly.Thanks in advance for your kind cooperation!

 

 


Hope it helps,


Community Support Team _ Caitlyn

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

amitchandak
Super User
Super User

@ronaldbalza2023 , Hope month is coming from date table, And you are selecting month year. because month alone will enable YTD for all years you have in data

Hi @amitchandak , thanks for taking the time on this. Yes it is from a date table and these are my slicer

ronaldbalza2023_0-1638883770239.png

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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