The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
The goal is to create a 'New Measure' to calculate the diffence between measure at point in time and previous week.
Solved! Go to Solution.
Hi @diogobraga2,
You can expand the calc provided by @v-lili6-msft like
New Measure = IF([Total Returning W]<> BLANK(),[Total Returning W] - CALCULATE([Total Returning W],DATEADD('Dates Adj'[Date],-7,DAY)), Blank())
Hope this Helps,
Richard
Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!
Proud to be a Super User!
hi @diogobraga2
Just use DATEADD to create a meausre as below:
https://docs.microsoft.com/en-us/dax/dateadd-function-dax
New Measure = [Total Returning W]- CALCULATE([Total Returning W],DATEADD('Dates Adj'[Date],-7,DAY))
Result:
Regards,
Lin
Thank you @v-lili6-msft! It looks good, the only minor adjustment is to not show the variance when Total Returning is null. What's your suggestion? See 8/9/2020 below.
Hi @diogobraga2,
You can expand the calc provided by @v-lili6-msft like
New Measure = IF([Total Returning W]<> BLANK(),[Total Returning W] - CALCULATE([Total Returning W],DATEADD('Dates Adj'[Date],-7,DAY)), Blank())
Hope this Helps,
Richard
Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!
Proud to be a Super User!
Thank you so much!
Hi @diogobraga2 ,
See this blog for week calculations
Regards,
Harsh Nathani
Did I answer your question? Mark my post as a solution! Appreciate with a Kudos!! (Click the Thumbs Up Button)
For my purpose, I think it's best to have it as a 'New Measure' instead of a 'New Column.' The pbix is included for anyone willing to show how it's done.