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

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now

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
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.