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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Chava1881
Helper II
Helper II

Dynamic date comparison - Help excluding when condition happens

Hello,

 

I am trying to create a measure that compares  info in dates, it works well but misleads people when seeing numbers for the current week, because even though it doesn't sum the previous week data it comes up and that's an issue that I need to correct but don't know how. 
I tried to take out everything that the min and max dates were equal but the solution did not work because this condition applies to two of the three possible scenarios (1 and 3) and there's one I need to keep (3), I list them below, I am using 12-16 vs 12-09 data:
Scenarios:

1- Component is shortage on on 12-09 but recovered (not coming up in 12-16)
2- Component is shortage on both dates

3- Component is new to list on 12-16 hence it is not listed on other time stamps

Is there a way I can tell the formula understanding what's recovered to take it out before calculating, it happens in both latest data formula and w/w comparison? See screenshot and data used for the example as I couldn't attached the PBIX.

 

Chava1881_0-1608217673461.png

 

Chava1881_1-1608218806030.png

 

 

----

Chava1881_0-1608218554017.png

 

 

 

2 REPLIES 2
amitchandak
Super User
Super User

@Chava1881 , I am a bit lost after the initial description.  If can you need a week-on-week comparison refer my blog or video, if not - Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.

 

Power BI — Week on Week and WTD - https://www.youtube.com/watch?v=pnAesWxYgJ8
https://medium.com/@amitchandak.1978/power-bi-wtd-questions-time-intelligence-4-5-98c30fab69d3
https://community.powerbi.com/t5/Community-Blog/Week-Is-Not-So-Weak-WTD-Last-WTD-and-This-Week-vs-La...

 

.Any Weekday Week - Start From Any day of Week
https://community.powerbi.com/t5/Community-Blog/Any-Weekday-Week-Decoding-Date-and-Calendar-2-5-Powe...

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Hi, it is a date comparison what I am trying to accomplish, so you select dates on a filter and it compares the the max vs the min
I couldn't attach the pbix, don't know why, but this is the link
https://drive.google.com/drive/folders/1sTo1AP5lE1kKcjjphb6p_TLFkuZAr9hh?usp=sharing 

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.