Forum Discussion
How to show different field value based on Slicer select/deselect
- 9 years ago
Hi smohapatra,
I believe that you can achieve that with the SWITCH formula, since you have different measures for organizational and Individual you can use something like this:
KPI_Value =SWITCH( TRUE(); CALCULATE( DISTINCTCOUNT(Table1[Company]); ALLSELECTED(Table1[Company]))>1; [OVERALL_MEASURE]; [INDIVIDUAL_MEASURE])I assume that you only want to have one value in the slicer that's why I look at greater than 1 to return the Overall, if you need to have the single value for more than one choice you can use this one:
KPI_Value =SWITCH( TRUE(); CALCULATE( DISTINCTCOUNT(Table1[Company]); ALLSELECTED(Table1[Company]))= CALCULATE( DISTINCTCOUNT(Table1[Company]); ALL(Table1[Company])); [OVERALL_MEASURE]; [INDIVIDUAL_MEASURE])I don't know if you have a separate table for the slicer or it's on the Dataset as one table but the distinctcount must be done in the table were you have the slicer allocated.
This formula was done only with a simple table with companies and count of companies no other information but should work with different setups also.
Regards,
MFelix
Hi smohapatra,
After review, please try to create measure based on MFelix posted, and check if it works fine.
If you still have not resolved your issue, please post some sample date for further analysis, so that we can post solution which is close to your requirement.
Thanks,
Angelia
Thanks Mfelix,
For your inputs. I am trying the solution provided by MFelix. I will try and let you know.
Regards,
Shakti
- smohapatra9 years agoRegular Visitor
MFelix, Thanks the solution worked. I used a IF condition and as I was having more than one organization so the conditions was something like as below :
KPI = IF(DISTINCTCOUNT(Table[Org])>number of Org,Overall Measure,Org Measure)