Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi all,
I would like to use an IF function and not apply a measure and get blank if one or two of the slicers have filters selected.
How could I do that?
Best regards
Solved! Go to Solution.
Hi @ecmsev ,
One sample for your reference, here I create a measure using HASONEVALUE to work on it.
Measure = VAR A = HASONEVALUE ( Table1[SLICER1] ) VAR B = HASONEVALUE ( Table2[SLICER2] ) RETURN IF ( A = TRUE () && B = TRUE (), MAX ( Table1[SLICER1] ) - MAX ( Table2[SLICER2] ), 0 )
Hi @ecmsev ,
One sample for your reference, here I create a measure using HASONEVALUE to work on it.
Measure = VAR A = HASONEVALUE ( Table1[SLICER1] ) VAR B = HASONEVALUE ( Table2[SLICER2] ) RETURN IF ( A = TRUE () && B = TRUE (), MAX ( Table1[SLICER1] ) - MAX ( Table2[SLICER2] ), 0 )
take a look at selectedvalue and hasonevalue dax functions
there are several videos showing how this works e.g.
Thanks a lot for your answer,
¿Is it possible to create two measures with ISFILTERED()*1 for each slicer and after use both in the IF function?
IF(Measure1+Measure2)>=2;"0";column1-column2)
User | Count |
---|---|
76 | |
75 | |
46 | |
31 | |
27 |
User | Count |
---|---|
99 | |
91 | |
51 | |
49 | |
45 |