The ultimate Microsoft Fabric, Power BI, Azure AI, and SQL learning event! Join us in Stockholm, Sweden from September 24-27, 2024.
2-for-1 sale on June 20 only!
Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
I have two items in my slicer checker called -
1) Suspicious sellers
2) Unauthorised sellers
If I select both 1 and 2, I want to show data for only suspicious even I select all,
Is that possible, can we create a measure or something like that?
Please help me fast as soon as you guys find anything, it's important
Thanks
Solved! Go to Solution.
Hi @Anonymous ,
You could follow the steps to have a try:
Slicer = VALUES('Table'[Sellers])
Measure =
var Selection = ALLSELECTED(Slicer[Sellers])
var TotalSales = CALCULATE(SUM('Table'[Sales]),FILTER('Table','Table'[Sellers] in Selection))
var SuspiciousSellers = CALCULATE(SUM('Table'[Sales]),FILTER('Table','Table'[Sellers] = "Suspicious sellers"))
var CountSelection = COUNTROWS(Selection)
return
IF(ISFILTERED(Slicer[Sellers]),IF(CountSelection>1,SuspiciousSellers,TotalSales),0)
For the option of "Select all", we can't get data from it. The result will show 0 (no filter) while using it in my sample. For more detais, please download the attachment below to try.
This depends on how your data looks but you should be able to do something like this.
Your main table:
Row Number |
Seller Type |
Row 2 | Suspicious Seller |
Row 3 | Unauthorized Seller |
Row 4 | Suspicious Seller |
Row 5 | Suspicious Seller |
Row 6 | Unauthorized Seller |
Create new table:
Key | Seller Filter |
- | Unauthorized Seller |
Suspicious Seller | Suspicious Seller |
When you have created the new table, create a relationship between "Key" and "Seller Type" and finally use "Seller Filter" in a slicer.
/ J
You didn't get my question
If i select suspicious seller then graph will show the count of suspicious seller and when I select unauthorised it show the count fo unauthorised seller.
And when I select both of them then graph will add the count of both suspicious and unauthorised seller,
but what I want to do is, when I select both of them then graph will show data for suspicious seller, is it possible?
By creating measure or something ?
Hi @Anonymous ,
You could follow the steps to have a try:
Slicer = VALUES('Table'[Sellers])
Measure =
var Selection = ALLSELECTED(Slicer[Sellers])
var TotalSales = CALCULATE(SUM('Table'[Sales]),FILTER('Table','Table'[Sellers] in Selection))
var SuspiciousSellers = CALCULATE(SUM('Table'[Sales]),FILTER('Table','Table'[Sellers] = "Suspicious sellers"))
var CountSelection = COUNTROWS(Selection)
return
IF(ISFILTERED(Slicer[Sellers]),IF(CountSelection>1,SuspiciousSellers,TotalSales),0)
For the option of "Select all", we can't get data from it. The result will show 0 (no filter) while using it in my sample. For more detais, please download the attachment below to try.
It is, post the measure that you are using in your visual.
/J
@Anonymous , refer how to control measure using slicer
You can change measure or calculation based on slicer
You didn't get my question
If i select suspicious seller then graph will show the count of suspicious seller and when I select unauthorised it show the count fo unauthorised seller.
And when I select both of them then graph will add the count of both suspicious and unauthorised seller,
but what I want to do is, when I select both of them then graph will show data for suspicious seller, is it possible?
By creating measure or something ?
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Check out the June 2024 Power BI update to learn about new features.
User | Count |
---|---|
105 | |
97 | |
81 | |
62 | |
54 |
User | Count |
---|---|
246 | |
119 | |
114 | |
87 | |
70 |