Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Is it possible to select a column dynamically, based on selection of a slicer item?
The slicer contains the column names.
I am trying to avoid having to write a number of similar Measures using SWITCH.
Code below does not work.
Cheers, J.
Dynamic Count = VAR varSelectedItem = [ItemSelection] // value from slicer with column names VAR varCountColumn = "factSanSeb[" & varSelectedItem & "]" RETURN COUNTA(varCountColumn)
Solved! Go to Solution.
Hello Pavan,
The solution below works. But I am trying to avoid having to write many Measures.
AVE Readings = IF(HASONEVALUE(MeasuredValues[Measure]); SWITCH(SELECTEDVALUE(MeasuredValues[Measure]); "NO";[NO Ave]; "SO2";[SO2 Ave]; "NO2";[NO2 Ave]; "O3";[O3 Ave]; "PM10";[PM10 Ave]; "PM2,5";[PM2,5 Ave]; "Precip.";[Precip. Ave]; "Other" ); BLANK())
Hello Pavan,
The solution below works. But I am trying to avoid having to write many Measures.
AVE Readings = IF(HASONEVALUE(MeasuredValues[Measure]); SWITCH(SELECTEDVALUE(MeasuredValues[Measure]); "NO";[NO Ave]; "SO2";[SO2 Ave]; "NO2";[NO2 Ave]; "O3";[O3 Ave]; "PM10";[PM10 Ave]; "PM2,5";[PM2,5 Ave]; "Precip.";[Precip. Ave]; "Other" ); BLANK())
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
110 | |
96 | |
77 | |
63 | |
55 |
User | Count |
---|---|
143 | |
109 | |
89 | |
84 | |
66 |