Forum Discussion
Disabling Measure when selecting multiple filters
Hi experts,
I have a simple measure that counts the Sales for the past 2 weeks.
On the top of the report I have a slicer/ filter to select the weeks.
Is there any chance to get a 0 value when selecting multiple weeks?
Mutiple selections is active in the filter since the visual contains several measures.
Hi,
You can accomplish for example by using HASONEFILTER. e.g.IF(HASONEFILTER('Calendar'[Week]),[Measure],0)
I hope this post helps to solve your issue and if it does consider accepting it as a solution and giving the post a thumbs up!
My LinkedIn: https://www.linkedin.com/in/n%C3%A4ttiahov-00001/- Anonymous4 years ago
Hey,
If you do not want to change Slicer selection settings, maybe amend measure.
So If filter selection HASONEVALUE, then show, else 0
7 Replies
- ValtteriN
Community Champion
Hi,
You can accomplish for example by using HASONEFILTER. e.g.IF(HASONEFILTER('Calendar'[Week]),[Measure],0)
I hope this post helps to solve your issue and if it does consider accepting it as a solution and giving the post a thumbs up!
My LinkedIn: https://www.linkedin.com/in/n%C3%A4ttiahov-00001/ - joshua1990
Post Prodigy
ValtteriN : Thanks, but this will not work since there is a single selection on the filter. I just want to get a 0 when multiple selections are placed.
- ValtteriN
Community Champion
joshua1990
If you use a hierarchy + single select this should work by referencing the Week column. E.g.Value1 = if(HASONEFILTER('Calendar'[This week]),1,0)- joshua1990
Post Prodigy
The slicer has to have the multiple selection option activated. Single selection as an option is not possible
- AnonymousNot applicable
Hey,
If you do not want to change Slicer selection settings, maybe amend measure.
So If filter selection HASONEVALUE, then show, else 0 - v-xiaotang
Community Support
Hi joshua1990
Try this,
test = IF ( ISFILTERED ( 'Table'[Value] ) && NOT ( HASONEVALUE ( 'Table'[Value] ) ), 0, 1 )Best Regards,
Community Support Team _Tang
If this post helps, please consider Accept it as the solution to help the other members find it more quickly.