Forum Discussion
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
- jdelektaFrequent Visitor
I didn't realize I couldn't upload a pbix file. Please see screen shots below.
- Greg_DecklerCommunity 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-TITHW/m-p/434008 - jdelektaFrequent Visitor
Greg_Deckler I just uploaded some screen shots. Thank you!
- Greg_DecklerCommunity Champion
jdelekta Will be far easier to troubleshoot if you share your PBIX via OneDrive, Box, etc.
- jdelektaFrequent Visitor
Greg_Deckler I uploaded it with this link https://1drv.ms/u/s!Arv4FwjDD7PXb50-qLKbx3sj2D0?e=1V7TgI thanks!