Forum Discussion

Black_magic100's avatar
Black_magic100
Helper III
7 years ago
Solved

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.  
  • 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).

4 Replies