Forum Discussion
Using Field Parameters efficiently with Small Multiples
- 1 year ago
Thanks johnt75 for the proposed solution.
I ended up copying the dataset and pivoting the Enrollment, Staff, and Diplomas columns. This allowed me to make a slicer based off a new column called "Metric" instead of having a slicer based off a field parameter. From there, I could now make a new measure for Lakeview based off the selected value the user had chosen in the slicer by utlizing the SWITCH function in DAX.
I think you could do this with a combination of a field parameter and a calculation group.
Create 3 measures, [Enrollment], [Staff] and [Diplomas] as simple SUM of the appropriate column. Create a field parameter with these measures as the values.
Then create a calculation group with 2 calculation items.
Lakeside calc item =
CALCULATE ( SELECTEDMEASURE (), 'Highschool Facts'[School] = "Lakeview High" )
Total calc item =
CALCULATE ( SELECTEDMEASURE (), REMOVEFILTERS ( 'Highschool Facts'[School] ) )
Thanks johnt75 for the proposed solution.
I ended up copying the dataset and pivoting the Enrollment, Staff, and Diplomas columns. This allowed me to make a slicer based off a new column called "Metric" instead of having a slicer based off a field parameter. From there, I could now make a new measure for Lakeview based off the selected value the user had chosen in the slicer by utlizing the SWITCH function in DAX.