Forum Discussion
Compare Data from 2 Slicer in one Database
nghyn Try this approach
Create DAX Measures:
Create two measures, one for each set of charts, based on the selected slicers.
Let's call them "Measure 1" and "Measure 2".
These measures should filter the data based on the selections from their respective slicers.
Create a Comparison Measure:
Create a new measure to calculate the comparison between "Measure 1" and "Measure 2".
Use the FILTER function to apply the selections from both slicers to the original dataset.
Calculate the desired comparison between the filtered data sets.
Create the Comparison Chart:
Use the comparison measure created in step 2 to create a new chart.
This chart will display the comparison between the data selected from both slicers.
Measure 1 = CALCULATE(SUM('YourTable'[Value]), 'YourTable'[Category] = SELECTEDVALUE('Slicer1'[Category]))
Measure 2 = CALCULATE(SUM('YourTable'[Value]), 'YourTable'[Region] = SELECTEDVALUE('Slicer2'[Region]))
Comparison =
VAR Value1 = [Measure 1]
VAR Value2 = [Measure 2]
RETURN
Value1 - Value2
Did I answer your question? Mark my post as a solution! Appreciate your Kudos !!
Are slicers objects you can reference by name in DAX? How do you view and reference a slicer's name?