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
Anonymous
Not applicable

Year to Date

Hi,

 

I am trying to do a 'year to date'  but my card is only showing 396.00 which is very wrong, my DAX is .

 

It should be a lot more does the DAX look ok?

 

yTD = TotalYTD(sum(adDetails[Revenue]), calender[Date], All(calender))
2 ACCEPTED SOLUTIONS

@Anonymous Do you have a filter or slicer applied that would alter the total on the report page?


Looking for more Power BI tips, tricks & tools? Check out PowerBI.tips the site I co-own with Mike Carlo. Also, if you are near SE WI? Join our PUG Milwaukee Brew City PUG

View solution in original post

kcantor
Community Champion
Community Champion

I believe you are hitting a glitch with the inclusion of the ALL function. YOu should specify a year end date with the YTD calculation if you have a custom calendar. For exampl if my fiscal year ended on June 30th I would use:

TOTALYTD([TotalRevenue], Calendar[Date], 6/30)

I would build the [Total Revenue calculation instead of calculating it within the other measure just to make sure that if a measure broke it would be easy to troubleshoot.

TotalRevenue = SUM(adDetails[Revenue])

If I did not need the fiscal year to be defined I would leave it out.

tOTALYTD([TotalRevenue], Calendar[Date])





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




View solution in original post

3 REPLIES 3
kcantor
Community Champion
Community Champion

I believe you are hitting a glitch with the inclusion of the ALL function. YOu should specify a year end date with the YTD calculation if you have a custom calendar. For exampl if my fiscal year ended on June 30th I would use:

TOTALYTD([TotalRevenue], Calendar[Date], 6/30)

I would build the [Total Revenue calculation instead of calculating it within the other measure just to make sure that if a measure broke it would be easy to troubleshoot.

TotalRevenue = SUM(adDetails[Revenue])

If I did not need the fiscal year to be defined I would leave it out.

tOTALYTD([TotalRevenue], Calendar[Date])





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Anonymous
Not applicable

 

Sorted!

@Anonymous Do you have a filter or slicer applied that would alter the total on the report page?


Looking for more Power BI tips, tricks & tools? Check out PowerBI.tips the site I co-own with Mike Carlo. Also, if you are near SE WI? Join our PUG Milwaukee Brew City PUG

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.