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

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now

Reply
Black_magic100
Helper III
Helper III

Having issues summing a table correctly

I have a table visual in my report that pulls entirely from a single table.  This table contains several calculated columns written in DAX.  One of these columns takes the sum of the previous 3 and returns a value based on a SWITCH statement.  I am attempting to SUM the values in this SWITCH statement column to get the total at the bottom.  Previously I was using the following measure:

 

Cyclestar Pay Real Values =
IF(COUNTROWS(VALUES(ClassSchedule[ID of Class]))=1,
[CycleStar Pay],
SUMX(VALUES(ClassSchedule[ID of Class]), [CycleStar Pay]))
 
However, this broke when I changed from using all measures to calculated columns.  I had to make this switch because calculated columns made more sense, but it broke the above measure and I can't seem to figure out how to sum the values in this table/column correctly.  
1 ACCEPTED SOLUTION

I switched some relationships around and ended up doing a simple SUM using a card visual.  However, to answer your question, Cyclestar pay is a calculated column (SWITCH statement), but I also have it written as a measure (the measure is not currently being used).

View solution in original post

4 REPLIES 4
Anonymous
Not applicable

Please let me know if [CycleStar Pay] is a measure or it is a column in the table. If it is a measure, can you please specify the measure code.

 

Thanks!

-Ayan

I switched some relationships around and ended up doing a simple SUM using a card visual.  However, to answer your question, Cyclestar pay is a calculated column (SWITCH statement), but I also have it written as a measure (the measure is not currently being used).

hi, @Black_magic100 

Could you please tell me if your problem has been solved? If it is, could you please mark the helpful replies as Answered?  Smiley Very Happy

 

Best Regards,

Lin

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

hi, @Black_magic100 

This looks like a measure totals problem. Very common. See this 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

 

If you still have the problem, please share a simple sample pbix file.

Please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490

 

Best Regards,

Lin

 

Community Support Team _ Lin
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.