Forum Discussion
Calculating a sum when a Column header contains a value
Hi aar0n,
For doing this the best way is to unpivot the columns month and make a calculated measure based on context for the count:
Count = CALCULATE(COUNT(Months_Data[Value]) ; Months_Data[Value] > 0)
Then just add the Attribute column to the columns and the values and created measure to values and reduce the size of the count measure in the matrix in order to hide it from the totals:
Regards,
Mfelix
- aar0n8 years agoAdvocate II
Thats a really clever way to do it.. the only issue is that i need the actual values for some other calculations! so i need the values themselves.
- MFelix8 years agoSuper User
Hi aar0n,
Not really sure what you mean by you need the actual values itself, unpivoting the columns only change the way the data is saved on the database, you aren't changing any of the values just putting them on columns to use on a different way you can still calculate measures and make visuals based on them you are not makning any data transformation.
Regards,
MFelix
- aar0n8 years agoAdvocate II
I Just mean that in your matrix visual, youre hiding the individual counts and leaving the column sums.
i only need the total value.