Forum Discussion
Slicer / Filter exception
- Anonymous4 years ago
Hi Anonymous ,
You can create two measures separately. When the slicer selects Truck, the display related to Truck is displayed. When the slicer selects Truck and Sedan, the display related to Truck and Sedan is displayed. I don't know what the result of your specific condition judgment is. To define the rules, you can replace the judgment result in the following function:
Measure = var _select=SELECTCOLUMNS('Car type',"1",'Car type'[CarType]) return IF( "Truck" in _select&& NOT("Sedan" in _select), SUM('hatchback and Sedan'[SumDuration]),0 )Measure 2 = var _select=SELECTCOLUMNS('Car type',"1",'Car type'[CarType]) return IF( "Truck" in _select&& "Sedan" in _select, SUM('Truck'[SumDuration]),0 )Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous Sorry, having trouble following, can you post sample data as text and expected output?
Not really enough information to go on, please first check if your issue is a common issue listed here: https://community.powerbi.com/t5/Community-Blog/Before-You-Post-Read-This/ba-p/1116882
Also, please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490
The most important parts are:
1. Sample data as text, use the table tool in the editing bar
2. Expected output from sample data
3. Explanation in words of how to get from 1. to 2.
- Anonymous4 years agoNot applicable
Hi Greg_Deckler , I've updated the question, thanks for the info!