Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
Hello Community,
Desperately need some help. Found similar requests and tested but have not reached a resolution.
I have the data below with 3 distinct IDs.
If I filter out records with Kiwi using a Slicer, I want to remove all rows with that ID number. So I'd be left with a count of 2 distinct IDs (records for ID 2 and 3).
ID | Item1 | Item2 |
1 | apple | pear |
1 | apple | orange |
1 | kiwi | banana |
2 | coconut | apple |
3 | pineapple | tomato |
Thank you for your time.
Solved! Go to Solution.
Hi, @min-E
Create a new table to get an item1 that has nothing to do with the table to use as a slicer:
Table 2 = SELECTCOLUMNS('Table','Table'[Item1])
Create a new measure to exclude the id value of the item selected by the slicer:
Measure =
VAR _ID = CALCULATE(MAX('Table'[ID]),FILTER(ALLSELECTED('Table'),'Table'[Item1]=SELECTEDVALUE('Table 2'[Item1])))
RETURN
IF(SELECTEDVALUE('Table'[ID])<>_ID,1)
Put Item1 from Table 2 into the slicer, and then put the measure into the table visual, here is my preview:
How to Get Your Question Answered Quickly
Best Regards
Yongkang Hua
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi, @min-E
Create a new table to get an item1 that has nothing to do with the table to use as a slicer:
Table 2 = SELECTCOLUMNS('Table','Table'[Item1])
Create a new measure to exclude the id value of the item selected by the slicer:
Measure =
VAR _ID = CALCULATE(MAX('Table'[ID]),FILTER(ALLSELECTED('Table'),'Table'[Item1]=SELECTEDVALUE('Table 2'[Item1])))
RETURN
IF(SELECTEDVALUE('Table'[ID])<>_ID,1)
Put Item1 from Table 2 into the slicer, and then put the measure into the table visual, here is my preview:
How to Get Your Question Answered Quickly
Best Regards
Yongkang Hua
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Just want to mention that I am using a slicer to filter records. I have a matrix with Distinct Count.
If I filter out only the row with Kiwi, I still have the same distinct count of IDs (3). Which is why I am looking to filter all the rows for that ID.
User | Count |
---|---|
84 | |
77 | |
76 | |
43 | |
36 |
User | Count |
---|---|
109 | |
56 | |
52 | |
45 | |
43 |