Forum Discussion
Multiple groupings for Column Headers
- 7 years ago
Hi Anonymous
You may use 'Unpivot columns' in query editor. Attached the sample file for your reference.
Regards,
Cherie
Ok, I'll see if I can do that. Now for another question. I'm new to DAX so here is an example of the conditional column I created to group two columns. I need the data in those two columns to be a calculation. How do I add that in to DAX statement or is there another way.
= Table.AddColumn(#"Unpivoted Other Columns", "Group", each if [Attribute] = "AppsPD" then "Life Apps" else if [Attribute] = "Apps" then "Life Apps" else null)
Example -
Hi Jveselka ,
Not sure what you want to calculate, you refer dax however you send a code with M language (power query)
What is the final result you want to achieve?
- Jveselka2 years agoFrequent Visitor
Grouped columns 1 and 2 and columns 4 and 5 need a calculation added. This is based on the period they select. I have a column the strips off the month in the period. 202305 for the calculation
TruncPeriod = MID('Standards'[Period],5,7)Apps1 = Standards[Apps]*[TruncPeriod]/12So using grouped column 1. This needs to group the two columns and do a calc for eachExample -
APPS PD = Standards[AppsPD]*[TruncPeriod]/12Apps1 = Standards[Apps]*[TruncPeriod]/12I can do this using a table visual but not sure if it will work with the matrix visual.