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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Anonymous
Not applicable

Sumx not calculating the grand total

Hi everyone,

First ever post.

I'm struggling to get the right formula for my solution.

I have a calculated column which follows the logic:
Products bought =
IF( A = 0 && B = 1, 1, 0)

I get the correct output:

Product A     1
Product B     2
Product C     1

Client is asking if the product appears just once, show it as 1, not a 2, so it would be like

Product A     1
Product B     1
Product C     1

Since it's a calculated column, i tried to use this formula for a solution:
IF(SUMX('Table','Table'[Products Bought]) >= 1, 1, 0)

Now I get the proper counts, but I can't get to show the result as a GRAND total or SUB Total.

How do I fix this?

Does my logic make sense?

Thank you in advance DAX guru's!

1 ACCEPTED SOLUTION
mlsx4
Memorable Member
Memorable Member

Hi @Anonymous 

 

Maybe you can try:

SUMX(VALUES('Table'[Product]),[Measure])

Where [Measure]=IF(SUMX('Table','Table'[Products Bought]) >= 1, 1, 0)

View solution in original post

2 REPLIES 2
mlsx4
Memorable Member
Memorable Member

Hi @Anonymous 

 

Maybe you can try:

SUMX(VALUES('Table'[Product]),[Measure])

Where [Measure]=IF(SUMX('Table','Table'[Products Bought]) >= 1, 1, 0)

Anonymous
Not applicable

Thank you very much! Worked like a charm 🙂

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 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.