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
harirao
Post Prodigy
Post Prodigy

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 9
harirao
Post Prodigy
Post 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 column

 

DAX.PNG

 

Regards,

Hari

Hi  @harirao ,

 

Go to query editor>add column>Index column:

 

Annotation 2020-04-21 142028.png

 

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:

Annotation 2020-04-21 142141.png

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:

Annotation 2020-04-21 142258.png

For the related .pbix file,pls click here.

 

Best Regards,
Kelly
Did I answer your question? Mark my post as a solution!

 

 

Thanks for your solution,

Please note: Forecastintegrity% is calculated measure, both solution is not working.

 

DAX1.PNGDAX2.PNG

 

Regards,

Hari

Hi  @harirao ,

 

Sorry I thought Forecastintegrity% is a calculated column,if it's a measure,it'd better first change into  a calculated column,could you pls advise me the dax expression of  Forecastintegrity% if you dont know how to change?

Or if it's possible,could you pls upload your .pbix file to onedrive business and share the link with us?

 

 

Best Regards,
Kelly
Did I answer your question? Mark my post as a solution!

Hi @v-kelly-msft ,

 

Please find the below dax used for calculations
DAX_cal.PNG

 

When i created column for Forecastintegrity% i was not getting correct result,  I tried doing "Don't Summarize" i was get 100%.
DAX_cal1.PNG

 

Regards,

Hari

Hi @harirao

 

Sorry for the late reply!

 

I have checked your calculated columns[Test CURP], [Test SFRP]  and your measure [Forecastintegrity%],results under which are right.

So would you pls advise me the logic about the columns with the measure?I need it to modify them.

 

 
Best Regards,
Kelly
Did I answer your question? Mark my post as a solution!

Hi @v-kelly-msft,

 

Can you please help on this calculation?

Regards,
Hari

@harirao did you referred to the videos I posted earlier, what exactly not working if you watched these videos.



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

parry2k
Super User
Super User

@harirao there are so many posts on time intelligence here few links

 

https://www.youtube.com/watch?v=jclWnA7pEvY

 

https://www.youtube.com/watch?v=jBPLm5BHl2c



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

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.