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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
jdelekta
Frequent Visitor

Apply DateAdd in Measures

Hello,

 

Please see attached. I am trying to calculate total defections over the last 3 months and total items that were not defects over the last 6 months. I'd ultimately like to divide these and show the changes each month. I created conditional columns in the data set to count the defects ("Defect Count") and everything else in the data ("Not Defect Count"). 

 

I've been using DateAdd but haven't had success. I've noticed that when I go further back in time I end up getting less results.

 

The expected result would be for "Defects Last 3 Months" would be 5 and for "Created Last 6 Months" would be 24. I am assuming it is something with the relationship.

 

Thank you. 

6 REPLIES 6
jdelekta
Frequent Visitor

@Greg_Deckler I just uploaded some screen shots. Thank you!

@jdelekta Will be far easier to troubleshoot if you share your PBIX via OneDrive, Box, etc.



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!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

@Greg_Deckler I wanted to see if you had any thoughts on the attached? I assume its related to the relationship that I created and I've been trying to adjust without any luck. Thanks!

Greg_Deckler
Community Champion
Community Champion

@jdelekta Don't see an attachment. 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!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...
jdelekta
Frequent Visitor

I didn't realize I couldn't upload a pbix file. Please see screen shots below.

 

jdelekta_0-1678996860837.png

jdelekta_1-1678996899660.pngjdelekta_2-1678996924514.png

jdelekta_3-1678996939123.pngjdelekta_4-1678996962195.png

 

jdelekta_5-1678996971638.png

 

 

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.

Top Solution Authors