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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
sue7579
New Member

increase /decrease over previous month FOR MULTIPLE DATE COULMS

i have a data for which we need to calculate increase/decrease from the previous month and previous days.

 

its a single table and the data is also available in single table.

 

Is there any DAX formula to calculate the value difference between two specific date coulmn wise 

 

for ex - there are 5 coulms for dates and we have to find the value difference between the two date coulms at a time.increase decrease over previous months dax.jpg

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @sue7579 ,

 

According to your description, here are my steps you can follow as a solution.

(1) This is my test data. 

vtangjiemsft_1-1687314270408.png

(2) We can create measures. 

2021-10-31-2021-5-31- = 
var _1031=CALCULATE(SUM('Table'[value]),FILTER(ALL('Table'),'Table'[type]=MAX('Table'[type]) && 'Table'[date]=DATE(2021,10,31)))
var _0531=CALCULATE(SUM('Table'[value]),FILTER(ALL('Table'),'Table'[type]=MAX('Table'[type]) && 'Table'[date]=DATE(2021,5,31)))
return _1031-_0531
2021-10-31-2021-6-30- = 
var _1031=CALCULATE(SUM('Table'[value]),FILTER(ALL('Table'),'Table'[type]=MAX('Table'[type]) && 'Table'[date]=DATE(2021,10,31)))
var _0630=CALCULATE(SUM('Table'[value]),FILTER(ALL('Table'),'Table'[type]=MAX('Table'[type]) && 'Table'[date]=DATE(2021,6,30)))
return _1031-_0630
2021-10-31-2021-8-31- = 
var _1031=CALCULATE(SUM('Table'[value]),FILTER(ALL('Table'),'Table'[type]=MAX('Table'[type]) && 'Table'[date]=DATE(2021,10,31)))
var _0831=CALCULATE(SUM('Table'[value]),FILTER(ALL('Table'),'Table'[type]=MAX('Table'[type]) && 'Table'[date]=DATE(2021,8,31)))
return _1031-_0831

(3) Then the result is as follows.

vtangjiemsft_2-1687314371042.png

 

If the above one can't help you get the desired result, please provide some sample data in your tables (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It is better if you can share a simplified pbix file. Thank you.

 

Best Regards,

Neeko Tang

If this post  helps, then please consider Accept it as the solution  to help the other members find it more quickly. 

View solution in original post

1 REPLY 1
Anonymous
Not applicable

Hi @sue7579 ,

 

According to your description, here are my steps you can follow as a solution.

(1) This is my test data. 

vtangjiemsft_1-1687314270408.png

(2) We can create measures. 

2021-10-31-2021-5-31- = 
var _1031=CALCULATE(SUM('Table'[value]),FILTER(ALL('Table'),'Table'[type]=MAX('Table'[type]) && 'Table'[date]=DATE(2021,10,31)))
var _0531=CALCULATE(SUM('Table'[value]),FILTER(ALL('Table'),'Table'[type]=MAX('Table'[type]) && 'Table'[date]=DATE(2021,5,31)))
return _1031-_0531
2021-10-31-2021-6-30- = 
var _1031=CALCULATE(SUM('Table'[value]),FILTER(ALL('Table'),'Table'[type]=MAX('Table'[type]) && 'Table'[date]=DATE(2021,10,31)))
var _0630=CALCULATE(SUM('Table'[value]),FILTER(ALL('Table'),'Table'[type]=MAX('Table'[type]) && 'Table'[date]=DATE(2021,6,30)))
return _1031-_0630
2021-10-31-2021-8-31- = 
var _1031=CALCULATE(SUM('Table'[value]),FILTER(ALL('Table'),'Table'[type]=MAX('Table'[type]) && 'Table'[date]=DATE(2021,10,31)))
var _0831=CALCULATE(SUM('Table'[value]),FILTER(ALL('Table'),'Table'[type]=MAX('Table'[type]) && 'Table'[date]=DATE(2021,8,31)))
return _1031-_0831

(3) Then the result is as follows.

vtangjiemsft_2-1687314371042.png

 

If the above one can't help you get the desired result, please provide some sample data in your tables (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It is better if you can share a simplified pbix file. Thank you.

 

Best Regards,

Neeko Tang

If this post  helps, then please consider Accept it as the solution  to help the other members find it more quickly. 

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.