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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Girish-Patil
Frequent Visitor

I Need dax measure for following output

Table

 Stock
Products01-01-202307-01-202314-01-2023
A110090110
A280120100
A3204010
A4503070

 

 

Required output - i need only change in the stock numbers Can any one help me with the dax

Products01-01-202307-01-202314-01-2023
A10-1020
A2040-20
A3020-30
A40-2040

 

1 REPLY 1
ChiragGarg2512
Solution Sage
Solution Sage

The dates need to be on rows, if not then unpivot.

Refer this for unpivoting:

https://youtu.be/2HjkBtxSM0g

 

Then join the date with Date in Date table and create date table if needed.

Then create a measure like one below and use it with date of week start form Date Table 

Diff = 
Var _Max = calculate(max(Table[Date]), filter(all(Date), Date[Date] < max(date[Date])))
return
sum(Table[Value]) -  calculate(max(Table[Date]), filter(all(Date), Date[Date] =_max))

 

Refer for more information:

ower BI — Week on Week and WTD   
https://medium.com/@amitchandak.1978/power-bi-wtd-questions-time-intelligence-4-5-98c30fab69d3
https://community.powerbi.com/t5/Community-Blog/Week-Is-Not-So-Weak-WTD-Last-WTD-and-This-Week-vs-La...
https://www.youtube.com/watch?v=pnAesWxYgJ8

 

Time Intelligence, Part of learn Power BI  https://youtu.be/cN8AO3_vmlY?t=27510
Day Intelligence - Last day, last non continous day 
https://medium.com/@amitchandak.1978/power-bi-day-intelligence-questions-time-intelligence-5-5-5c324...

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

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