Forum Discussion
Selected value in Slycer not equal to column values
Hi,
I have the following table:
The data is the following:
I would like to create the following card: If the selected value in the slycer Team 1 is not equal to Team 2 then show the sum of sales.
For example, if in the slicer the value A is selected the card should show 96K that is the sum of B,C, D, blanks in Team 2.
Is it possible to do it with DAX?
Thank you so much!
- Anonymous2 years ago
Hi,
Thanks for the solution Ritaf1983 provided, it is excellent, and i want to offer some more information for user to refer to.
hello EsterBR , you can refer to the following solution.
The sample data is the same as you provided.
1.Create a new slicer table. there is no relationship between tha tables
Slicer = SUMMARIZE('Table',[Team1])2.Create a measure
MEASURE = IF ( ISFILTERED ( 'Slicer'[Team1] ), CALCULATE ( SUM ( 'Table'[Sales] ), FILTER ( 'Table', NOT ( 'Table'[Team2] IN VALUES ( 'Slicer'[Team1] ) ) ) ), CALCULATE ( SUM ( 'Table'[Sales] ) ) )3.Then put the team1 field of the slicer table to slicer visual, and put the other field to to the table visual.
Output
Best Regards!
Yolo Zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
2 Replies
- AnonymousNot applicable
Hi,
Thanks for the solution Ritaf1983 provided, it is excellent, and i want to offer some more information for user to refer to.
hello EsterBR , you can refer to the following solution.
The sample data is the same as you provided.
1.Create a new slicer table. there is no relationship between tha tables
Slicer = SUMMARIZE('Table',[Team1])2.Create a measure
MEASURE = IF ( ISFILTERED ( 'Slicer'[Team1] ), CALCULATE ( SUM ( 'Table'[Sales] ), FILTER ( 'Table', NOT ( 'Table'[Team2] IN VALUES ( 'Slicer'[Team1] ) ) ) ), CALCULATE ( SUM ( 'Table'[Sales] ) ) )3.Then put the team1 field of the slicer table to slicer visual, and put the other field to to the table visual.
Output
Best Regards!
Yolo Zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.