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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
HasanRehman
New Member

Having issues with YTD through a DAX measure

Hi all, 

I'm trying to caculating YTD through a DAX measure and not gettng the results I expected. My data source is a SharePoint list that has a title for a month, the start date for that month, Period Goal and Period Actual. I want to calculate the YTD Goal and YTD Actuals so I created a measure with this formula for the YTD Actuals: YTDExample = TOTALYTD(SUM('Test'[Period Actual]),'Test'[Date])

 

HasanRehman_0-1702408043425.png

When I see this in Power BI as a table, the YTD doesn't seem to calculate the YTD Actuals - it simply just displays the same as Period Actual:

HasanRehman_1-1702408183984.png

To make matters worse, if I remove the title from the table, it sums it for 2 months - March and October - no clue why:

 

HasanRehman_2-1702408347548.png

What I'm expecting to see (when I do this in DAX studio) is:

 

HasanRehman_3-1702408499606.png

 

Any idea what I'm doing wrong? Please help! Thanks in advance!

1 ACCEPTED SOLUTION
Greg_Deckler
Super User
Super User

@HasanRehman You may find this helpful - https://community.powerbi.com/t5/Community-Blog/To-bleep-With-Time-Intelligence/ba-p/1260000

Also, see if my Time Intelligence the Hard Way provides a different way of accomplishing what you are going for.

https://community.powerbi.com/t5/Quick-Measures-Gallery/Time-Intelligence-quot-The-Hard-Way-quot-TIT...


Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

View solution in original post

2 REPLIES 2
Greg_Deckler
Super User
Super User

@HasanRehman You may find this helpful - https://community.powerbi.com/t5/Community-Blog/To-bleep-With-Time-Intelligence/ba-p/1260000

Also, see if my Time Intelligence the Hard Way provides a different way of accomplishing what you are going for.

https://community.powerbi.com/t5/Quick-Measures-Gallery/Time-Intelligence-quot-The-Hard-Way-quot-TIT...


Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

Thanks a lot, that's a whole lot of info. I'll review and let you know if this fixed my issue. 

 

Edit -- that was it!!! I just need to watch the video to understand why, but thank you so much! 🙂

Helpful resources

Announcements
July 2024 Power BI Update

Power BI Monthly Update - July 2024

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

PBI_Carousel_NL_June

Fabric Community Update - June 2024

Get the latest Fabric updates from Build 2024, key Skills Challenge voucher deadlines, top blogs, forum posts, and product ideas.