Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hello folks,
I have been thinking about how to slice my data for a number of different charts and have come up stuck on how to include and exclude data my report.
phrase | tags |
french wine | france |
french red wine | france |
french red wine | red wine |
french red wine vs italian red wine | france |
french red wine vs italian red wine | italy |
french red wine vs italian red wine | red wine |
spanish red wine | spain |
spanish red wine | red wine |
Is english white wine good? | uk |
Is english white wine good? | white wine |
I have phrases in a table visual and I'm trying to find a way to exclude phrases attached to tags that are deselected in a slicer. E.g. if france is the only item selected in the slicer, then only the phrase "french wine" would be showing in the visual, because all the other phrases related to france are also related to other tags.
Is this possible?
Solved! Go to Solution.
Hi @badger123 ,
We can use the following method:
First we can create two calculated table using the following DAX query:
tags = VALUES(Table1[tags])
phrase = SUMMARIZE(Table1,Table1[phrase],"tag",CONCATENATEX(Table1,Table1[tags],","))
Then we can create a measure like below:
Measure = var a = CONCATENATEX(ALLSELECTED(tags[tags]),tags[tags],",") return IF(MIN(phrase[tag]) = a,1,0)
After that we can add this measure as filter:
The result will like below:
Best Regards,
Teige
Hi @badger123 ,
We can use the following method:
First we can create two calculated table using the following DAX query:
tags = VALUES(Table1[tags])
phrase = SUMMARIZE(Table1,Table1[phrase],"tag",CONCATENATEX(Table1,Table1[tags],","))
Then we can create a measure like below:
Measure = var a = CONCATENATEX(ALLSELECTED(tags[tags]),tags[tags],",") return IF(MIN(phrase[tag]) = a,1,0)
After that we can add this measure as filter:
The result will like below:
Best Regards,
Teige
Thanks @TeigeGao ! That works... but only allows one selection. Is it possible to create a measure that allows for multiple selection in slicer?
Hi @badger123 ,
There is no need to create a measure, we can use Ctrl + click to select multiple slicers.
Best Regards,
Teige
@badger123 you can do it in below way..Create a slicer for Tags and then create a bar graph as below:
Hi @gyan09 , thanks for the quick response. I misexplained what I was trying to achieve in my original post (it was completely contradictary - sorry). I have now amended the problem. Please let me know if you have any ideas!? 🙂
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
112 | |
97 | |
84 | |
67 | |
60 |
User | Count |
---|---|
150 | |
120 | |
99 | |
87 | |
68 |