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
schuffa
Advocate II
Advocate II

Showing MTD and Prior MTD based on Working Day in the same chart

Hello Power BI Community,

 

I'd like to show a dataseries by working day for the current + prior month in one chart. The tricky part is, that as each month can have different working days (WD), the correct sums by WD shows up. I had managed to overcome the topic showing the prior month data related the prior month WD by adding a separate working day table (DV_WD), linked to the WD column of the DV_Date table and using this piece of code: 

NS PMTWD = CALCULATE([NS],
FILTER(ALL(DV_Date),
DV_Date[Month_relative] = VALUES(DV_Date[Month_relative]) -1
&& DV_Date[WD] <= MAX(DV_WD[WD])
))
-> problem is now, that the evaluation does NOT stop with the Max WD of the respective Prior Month, but with the SELECTED month. This leads to incorrect results. Eg. selecting Feb'21 (18 WD's) the Jan'21 dataline stops as well on WD18 - even though Jan'21 had 20 WD's. So the last both data points are not shown.
Capture.PNG
Question is: How can I achieve to show also for the prior month ALL working days of the PM aside the WD's of the current month?
Any help is appreciated, please find the sample pbix with randomized numbers here: https://www.dropbox.com/s/oou9pk8h0kg7g5z/WD%20Problem.pbix?dl=0 
1 ACCEPTED SOLUTION
PaulOlding
Solution Sage
Solution Sage

I think this video goes through a solution to this exact problem:

https://www.youtube.com/watch?v=nYH738VONi8 

 

 

View solution in original post

1 REPLY 1
PaulOlding
Solution Sage
Solution Sage

I think this video goes through a solution to this exact problem:

https://www.youtube.com/watch?v=nYH738VONi8 

 

 

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.