Forum Discussion
If/or statement with slicers
- Anonymous5 years ago
Hi mmills2018 ,
If I understand you correctly, you could use ISFILTERED() function with SWITCH() or IF() function.
For example:
SWITCH(TRUE(),ISFILTERED(slicer1),measure1,ISFILTERED(slicer2),measure2,measure3).
Measure = var _a = CALCULATE(DISTINCTCOUNT('Table'[Associate ID]),FILTER('Table','Table'[Company]=SELECTEDVALUE('Table'[Company])&&'Table'[Potential]<>BLANK())) var _b = CALCULATE(DISTINCTCOUNT('Table'[Associate ID]),FILTER('Table','Table'[Company]=SELECTEDVALUE('Table'[Company]))) return _a/_b Measure 2 = var _a = CALCULATE(DISTINCTCOUNT('Table'[Associate ID]),FILTER('Table','Table'[Company]=SELECTEDVALUE('Table'[Company])&&'Table'[Potential]<>BLANK())) var _b = CALCULATE(DISTINCTCOUNT('Table'[Associate ID]),FILTER(ALL('Table'),'Table'[Company]=SELECTEDVALUE('Table'[Company])&&'Table'[Potential]<>BLANK())) return _a/_bThe same for the POC slicer.
Best Regards,
Jay
mmills2018 see attached, tweak it as per your need.
Check my latest blog post Improve UX: Show Year in Legend When Using Time Intelligence Measures | PeryTUS IT Solutions I would ❤ Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos to whoever helped to solve your problem. It is a token of appreciation!
⚡Visit us at https://perytus.com, your one-stop-shop for Power BI-related projects/training/consultancy.⚡
thanks but my filters are not connected to the data source. I need an If Poc is filter then XYZ, if gender is filter than XYZ
- mmills20185 years ago
Helper IV
Hi parry2k any ideas?