Forum Discussion
DAX: Difference Percentage(Current Week % - Previous Week%)
Hi All,
I want to calculated diffrence % of (Current week- Previous Week). created two new columns i.e Latest Date & Previous week.
9 Replies
- parry2kSuper User
harirao there are so many posts on time intelligence here few links
https://www.youtube.com/watch?v=jclWnA7pEvY
- hariraoPost Prodigy
Below is the example what i am looking I want to create a new column where i should see the Diffrence %
Product ID "142263-013" for Current wk diffrence is "-15%"(100%-115%) & "142263-013" -63%(100%-163%)
Please note Forecastintegrity% is caluclated columnRegards,
Hari
- v-kelly-msftCommunity Support
Hi harirao ,
Go to query editor>add column>Index column:
Then you can create a calculated column to achieve what you need:
Column = var a=CALCULATE(MAX('Table'[Forcastintergity%]),FILTER('Table','Table'[Index]<EARLIER('Table'[Index])&&'Table'[Product ID]=EARLIER('Table'[Product ID]))) Return IF(a=BLANK(),BLANK(),'Table'[Forcastintergity%]-a)And you will see:
Or you can create a measure instead:
Measure = var a=CALCULATE(MAX('Table'[Forcastintergity%]),FILTER(ALL('Table'),'Table'[Index]<SELECTEDVALUE('Table'[Index])&&'Table'[Product ID]=SELECTEDVALUE('Table'[Product ID]))) Return IF(a=BLANK(),BLANK(),MAX('Table'[Forcastintergity%])-a)And you will see:
For the related .pbix file,pls click here.
Best Regards,
KellyDid I answer your question? Mark my post as a solution!- hariraoPost Prodigy
Thanks for your solution,
Please note: Forecastintegrity% is calculated measure, both solution is not working.
Regards,
Hari