Forum Discussion
Dax Measure showing selected column in table/ matrix
- Anonymous2 years ago
Hi lbendlin ,thanks for the quick reply, I'll add further.
Hi Kopek ,
You can use the 'Matrix' visual.'Table' visual doesn't meet your needs.The Table data is shown below:
Please follow these steps:
1. Use the following DAX expression to create a tableTable 2 = {"Plan Name","Date","Region"}2.Use the following DAX expression to create a measure
Measure = VAR _a = SELECTEDVALUE('Table 2'[Value]) VAR _b = SWITCH(TRUE(), _a = "Date",CONCATENATEX(SELECTCOLUMNS('Table',"Date",[Date]),[Date],UNICHAR(10)), _a = "Plan Name",CONCATENATEX(SELECTCOLUMNS('Table',"Plan Name",[Plan Name]),[Plan Name],UNICHAR(10)), _a = "Region",CONCATENATEX(SELECTCOLUMNS('Table',"Region",[Region]),[Region],UNICHAR(10)) ) RETURN _b3.Use the following DAX expression to create a measure for tooltip
Measure 2 = VAR _a = SELECTEDVALUE('Table 2'[Value]) RETURN SWITCH(TRUE(), _a = "Plan Name","Plan Name Definition", _a = "Date","Date Definition", _a = "Region","Region Definition")4.Final output
Hi lbendlin ,thanks for the quick reply, I'll add further.
Hi Kopek ,
You can use the 'Matrix' visual.'Table' visual doesn't meet your needs.The Table data is shown below:
Please follow these steps:
1. Use the following DAX expression to create a table
Table 2 = {"Plan Name","Date","Region"}
2.Use the following DAX expression to create a measure
Measure =
VAR _a = SELECTEDVALUE('Table 2'[Value])
VAR _b = SWITCH(TRUE(),
_a = "Date",CONCATENATEX(SELECTCOLUMNS('Table',"Date",[Date]),[Date],UNICHAR(10)),
_a = "Plan Name",CONCATENATEX(SELECTCOLUMNS('Table',"Plan Name",[Plan Name]),[Plan Name],UNICHAR(10)),
_a = "Region",CONCATENATEX(SELECTCOLUMNS('Table',"Region",[Region]),[Region],UNICHAR(10))
)
RETURN _b
3.Use the following DAX expression to create a measure for tooltip
Measure 2 =
VAR _a = SELECTEDVALUE('Table 2'[Value])
RETURN SWITCH(TRUE(),
_a = "Plan Name","Plan Name Definition",
_a = "Date","Date Definition",
_a = "Region","Region Definition")
4.Final output
Hi Anonymous , i have modified it a bit, but with matrix it works perfectly fine!
thanks for your help! 🙂