Forum Discussion
swicth with Slicer Selection
Hi Experts
Not sure on how to do the following, when ALL is shown on the filter/slicer i want to use measure from Table A and when the user selects a product from filter/slicer i want to use meaure from Table B
Measure from Table A
KPY
PrimaryYears
Measure from Table B
KMYears
PrimaryYears
Hi Anonymous ,
Sorry but I'm not understanding your phrase.
In the example I send you I only place the 3 measures for comparision., if you take out the other two measure you only bet the red line that get's one or other calculation.
check PBIX file attach if this is the expected result.
Regards,
MFelix
16 Replies
- MFelix
Super User
Hi Anonymous ,
Your information is very reduced but based on what I can understand what you need to do is something similar to this:
Measure A or B = IF ( DISTINCTCOUNT ( Table[SlicerColumn] ) = CALCULATE ( DISTINCTCOUNT ( Table[SlicerColumn] ); ALL ( Table[SlicerColumn] ) ); [Measure Table A]; [Measure Table B ] )Without having more information is dificult to point out a better answer but this should do the trick.
Adjust the measure based on your tables, columns and measure names.
Regards,
MFelix
- AnonymousNot applicable
Hi MFelix
Ill upload a file with some sample data, i have called your measure All Measure and its in table STEMBRANDYEARS
The filter i have highlighted in Blue.
Table A is called KM Year and i want to use measure MYKMYears and if possible also PRIMARYTOOUTCOMEYEARS when all is selected
and
TableB is called STEMBRANDYEARS and i want to use measure KPYears and if poosible from this table PRIMARYTOOUTCOMEYEARS when a product is selected from the highlighted filter.
https://www.dropbox.com/s/80akom988tzyz0k/Test_KPV_1.1.pbix?dl=0
- MFelix
Super User
Hi Anonymous ,
Believe you have upload incorrect file as you can see there is no All Measure and no highlithed filter:
Regards,
MFelix