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! Request now

Reply
Anonymous
Not applicable

Power BI value DAX Aggregation sum issue

Here is my source data:

andrewseaman_0-1599862567432.png

I then create two Tables "Version_1" and "Version_2".  I then create slicers to compare different versions:

andrewseaman_1-1599862625024.png

Value V1, Value V2, Quarter V1, and Quarter V2 are all calculated using dax statements like this:

andrewseaman_2-1599862663997.png

 

My issue is aggregation with Value V2 Adj.  Here is the logic for Value V2 Adj:

andrewseaman_3-1599862726622.png

So if Quarter V1 <> Quarter V2 value = 0, but if the quarters are equal then value = Value 2.

 

Each row calculates correctly, but then I cannot sum at the bottom of the table and build aggregated charts.

 

andrewseaman_4-1599862811055.png

 

 

1 ACCEPTED SOLUTION
Icey
Community Support
Community Support

Hi @Anonymous ,

 

The total value of [Value V2 Adj] = 0 is correct. The calculation logic is like below:

value.PNG

Please try to modify your measure as @amitchandak mentioned:

Value V2 Adj 2 =
SUMX (
    VALUES ( 'Table'[Customer] ),
    IF ( [Quarter V1] <> [Quarter V2], 0, [Value V2] )
)

 

 

Best Regards,

Icey

 

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

3 REPLIES 3
Icey
Community Support
Community Support

Hi @Anonymous ,

 

The total value of [Value V2 Adj] = 0 is correct. The calculation logic is like below:

value.PNG

Please try to modify your measure as @amitchandak mentioned:

Value V2 Adj 2 =
SUMX (
    VALUES ( 'Table'[Customer] ),
    IF ( [Quarter V1] <> [Quarter V2], 0, [Value V2] )
)

 

 

Best Regards,

Icey

 

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

amitchandak
Super User
Super User

@Anonymous , Try like.

 

sumx(Values(table[customer]), if([Quarter V1] <> [Quarter V2],0, [value V2] ))
sumx(Summarize(table[customer],"_1", if([Quarter V1] <> [Quarter V2],0, [value V2] )),[_1])

 

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Greg_Deckler
Community Champion
Community Champion

@Anonymous This looks like a measure totals problem. Very common. See my post about it here: https://community.powerbi.com/t5/DAX-Commands-and-Tips/Dealing-with-Measure-Totals/td-p/63376

Also, this Quick Measure, Measure Totals, The Final Word should get you what you need:
https://community.powerbi.com/t5/Quick-Measures-Gallery/Measure-Totals-The-Final-Word/m-p/547907

 

@ me in reply if you have issues



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

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!

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