cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
TAI
New Member

data divided by YTD, PYTD and month

I’m having trouble dividing my data by month, YTD, and PYTD.

 

This is what the source data table looks like. I need to divide the data columns on "Actual", "Budget" and "Diff" into Month, YTD, and the previous year's YTD for comparison.

Source.jpg

 

This is close to what I need except the data is separated to two different tables which does not look good. 2021 being the previous year to YTD.

Almost.jpg

 

This is what I tried which did not work. This is my first time using DAX so any help would be appreciated.

DAX.jpg

1 REPLY 1
Greg_Deckler
Super User
Super User

@TAI This may help: Better Year to Date Total - Microsoft Power BI Community

 

Sorry, having trouble following, can you post sample data as text and expected output?
Not really enough information to go on, please first check if your issue is a common issue listed here: https://community.powerbi.com/t5/Community-Blog/Before-You-Post-Read-This/ba-p/1116882

Also, please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490

The most important parts are:
1. Sample data as text, use the table tool in the editing bar
2. Expected output from sample data
3. Explanation in words of how to get from 1. to 2.

 

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...

 

 

 


@ 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!:
Mastering Power BI 2nd Edition

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
May 2023 update

Power BI May 2023 Update

Find out more about the May 2023 update.

Submit your Data Story

Data Stories Gallery

Share your Data Story with the Community in the Data Stories Gallery.

Top Solution Authors
Top Kudoed Authors