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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
Anonymous
Not applicable

DAX Help on Sum

Hi,

 

Need help in attached file. I've the calcualted Columns attached in my dataset.  I've Columns 

 

Month, Result and Diff.

 

Requirements are

 

 1. The required column should be sum of all values of "Diff" till Jul and from Aug it should reflect "Result" values, and the scenario will continue in preceeding Months like in Aug it should reflect the sum of values of "Diff" and from Sep it should get the values from "Result" Column.

2. Need a Dax to get the result Dynamycally to get the values based on Month selection.

 

Please find the sample file and please let me know if you need further details.

https://drive.google.com/file/d/1pTUI-GDnNiKRy1v2DW5zngxKI6DyF0_p/view?usp=sharing

 

Regards,

1 ACCEPTED SOLUTION
dax
Community Support
Community Support

Hi

You could create a table for Month slicer, then use below measure

measurem =
IF (
    MONTH ( MIN ( Table6[date] ) ) > SELECTEDVALUE ( 'Month'[month] ),
    SUM ( Table6[amount] ),
    SUM ( Table6[diff] )
)

99.png

Best Regards,

Zoe Zhi

 

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

2 REPLIES 2
dax
Community Support
Community Support

Hi

You could create a table for Month slicer, then use below measure

measurem =
IF (
    MONTH ( MIN ( Table6[date] ) ) > SELECTEDVALUE ( 'Month'[month] ),
    SUM ( Table6[amount] ),
    SUM ( Table6[diff] )
)

99.png

Best Regards,

Zoe Zhi

 

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

 

Anonymous
Not applicable

Hi @Anonymous ,

 

Please try below measure:

Measure 2 = IF(MAX('Table (2)'[Month]) < DATE(2019,8,1),SUM('Table (2)'[Diff]),SUM('Table (2)'[Result]))

DAX Help on Sum.PNG

Aiolos Zhao

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.

Top Solution Authors