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
ANM_97
Helper IV
Helper IV

CALCULATE DISTINCT SUM FOR YTD

Hello!

I try to calculate the sum of the value at YTD, the total should be 1700 if we look at 2 months from 2021. In the first month we have 500, and in the second month 500 + 1200.
In the first month YTD = 500, in the second month YTD = 1700.

I have attached an example.
Using TOTALYTD (SUM (VALUE), DIM_DATE[DATE] ), the values ​​are added.
How can I achieve the expected result?

 

DATEGROUPVALUESACTUAL RESULTEXPECTED RESULT 
1/1/2021A500500500
1/2/2021A5001000500
1/3/2021A5001500500
1/4/2021A5002000500
1/5/2021A5002500500
1/6/2021A5003000500
1/7/2021A5003500500
1/8/2021A5004000500
1/9/2021A5004500500
1/10/2021A5005000500
1/11/2021A5005500500
1/12/2021A5006000500
1/13/2021A5006500500
1/14/2021A5007000500
1/15/2021A5007500500
1/16/2021A5008000500
1/17/2021A5008500500
1/18/2021A5009000500
1/19/2021A5009500500
1/20/2021A50010000500
1/21/2021A50010500500
1/22/2021A50011000500
1/23/2021A50011500500
1/24/2021A50012000500
1/25/2021A50012500500
1/26/2021A50013000500
1/27/2021A50013500500
1/28/2021A50014000500
1/29/2021A50014500500
1/30/2021A50015000500
1/31/2021A50020000500
2/1/2021A1200212001700
2/2/2021A1200224001700
2/3/2021A1200236001700
2/4/2021A1200248001700
2/5/2021A1200260001700
2/6/2021A1200272001700
2/7/2021A1200284001700
2/8/2021A1200296001700
2/9/2021A1200308001700
2/10/2021A1200320001700
2/11/2021A1200332001700
2/12/2021A1200344001700
2/13/2021A1200356001700
2/14/2021A1200368001700
2/15/2021A1200380001700
2/16/2021A1200392001700
2/17/2021A1200404001700
2/18/2021A1200416001700
2/19/2021A1200428001700
2/20/2021A1200440001700
2/21/2021A1200452001700
2/22/2021A1200464001700
2/23/2021A1200476001700
2/24/2021A1200488001700
2/25/2021A1200500001700
2/26/2021A1200512001700
2/27/2021A1200524001700
2/28/2021A1200536001700
TOTAL YTDA1700553001700

Thank you~~!

1 ACCEPTED SOLUTION
CNENFRNL
Community Champion
Community Champion

As to me, it's wierd to display results at MONTH level in a visual with granularity of DAY. Whatever, there're possible solutions.

Screenshot 2021-06-07 114753.pngScreenshot 2021-06-07 114841.png


Thanks to the great efforts by MS engineers to simplify syntax of DAX! Most beginners are SUCCESSFULLY MISLED to think that they could easily master DAX; but it turns out that the intricacy of the most frequently used RANKX() is still way beyond their comprehension!

DAX is simple, but NOT EASY!

View solution in original post

3 REPLIES 3
CNENFRNL
Community Champion
Community Champion

As to me, it's wierd to display results at MONTH level in a visual with granularity of DAY. Whatever, there're possible solutions.

Screenshot 2021-06-07 114753.pngScreenshot 2021-06-07 114841.png


Thanks to the great efforts by MS engineers to simplify syntax of DAX! Most beginners are SUCCESSFULLY MISLED to think that they could easily master DAX; but it turns out that the intricacy of the most frequently used RANKX() is still way beyond their comprehension!

DAX is simple, but NOT EASY!

@CNENFRNLIf I use the YTD formula on certain groups, how can I change the formula so that I see the total on that group, not the average?

Thank you so much!! ~~

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.