Forum Discussion
Krexx
5 years agoHelper I
Create Column Header above Measures in Matrix or delete empty columns
Hello together, i will try it simple 🙂 I would like to achieve this So now when i am using following code i am losing the measure under the headername "Month" & "YTD", so i cant...
- 5 years ago
Hi Krexx
Instead of using a variable use the syntax within the switch measure:
SWITCH(SELECTEDVALUE(Spalten[ID]), 1, CALCULATE([H_R_Monat]), 2, CALCULATE([H_A_Monat]), 3, CALCULATE([H_Ist_Gesch_M]), 4, CALCULATE([H_P_Monat]), 5, CALCULATE([H_Abw_Monat]), 6, CALCULATE([H_in%_Monat]), 10, CALCULATE([H_R_YTD]), 11, CALCULATE([H_A_YTD]), 12, CALCULATE([H_Ist_Gesch_YTD]), 13, CALCULATE([H_P_YTD]), 14, CALCULATE([H_Abw_YTD]), 15, CALCULATE([H_in%_YTD]), 19, CALCULATE([H_P_Year]), 20, CALCULATE([H_P_Monat]) )
MFelix
5 years agoSuper User
Hi Krexx
You need to place both measure in the same switch function:
_H_R_Monat_Test =
VAR Spalte = SELECTEDVALUE(Spalten2[Spalte])
Return
SWITCH(TRUE(),Spalte="Month", CALCULATE([H_R_Month]), Spalte="YTD", CALCULATE([H_R_YTD]))
Krexx
5 years agoHelper I
I tried this already, but i have the problem that i have measures that only need to be displayed in YTD.
When i am creating then the following measure:
Test_Value =
VAR Spalte = SELECTEDVALUE(Spalten2[Spalte])
Return
SWITCH(TRUE(),Spalte="YTD", CALCULATE([Test_Value]))
This value is also displayed under Month...the easiest way would be to remove than these columns but i couldnt find any solution to this until now...