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
paolomint
Helper III
Helper III

No SUM for IF function

Dear all,

please have a look below.

I'm using a IF function and I don not understand why it works correctly but the total ammount of the row is zero and not the sum of all the values.

How can I fix this?

Thanks in advance.

Paolo

 

Cattura.JPG

1 ACCEPTED SOLUTION

Thank for your reply,

I need an if function because I need sum on different column.

Anyhow I solved in SQL. 

Bye

Paolo

View solution in original post

3 REPLIES 3
amitchandak
Super User
Super User

@paolomint , refer to a suggestion by @Anonymous , or you have force row level total like

 

new measure =

Sumx(Summarize(Table, Table[Year], Table[Month], "_1", [Your Measure]) , [_1])

 

https://www.youtube.com/watch?v=ufHOOLdi_jk

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
Anonymous
Not applicable

Hi,
1- Show you complete dax function, also the refrenced measure.
2- Use Calculate function intead of if, to get the sum for filtered conditions, like this
calculate(sum('tablename'[columnname]),Condition 1 && Condition 2 ---------etc)

Thank for your reply,

I need an if function because I need sum on different column.

Anyhow I solved in SQL. 

Bye

Paolo

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.