The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.
Hi there,
I need to create a slicer that will filter my output based on a column different from the one in the slicer. In the example below, my slicer should be on the column "Product", and my output needs to give me every Store and Product that contains that product.
I tried creating a summarized table with the combinations for Store and Product, then created a relationship from that summary table to Table1 via the "Store", and used "Product" in the slicer. This ends up being a many-to-many, which I thought it'd be okay in this context, but that didn't seem to work in my model.
Any help is greatly appreciated!
Solved! Go to Solution.
hi @kamiluc ,
not sure if i fully get you, supposing your table named data, try like:
1) plot a slicer with a calculated table like:
data2 = VALUES(data[Product])
2) pull a measure like below to the filter pane of your original table visual and select 1:
measure =
VAR _product = SELECTEDVALUE(data2[product])
VAR _list =
CALCULATETABLE(
VALUES(data[product]),
REMOVEFILTERS(data[product])
)
VAR _result = IF(_product IN _list, 1, 0)
RETURN _result
it worked like:
hi @kamiluc ,
not sure if i fully get you, supposing your table named data, try like:
1) plot a slicer with a calculated table like:
data2 = VALUES(data[Product])
2) pull a measure like below to the filter pane of your original table visual and select 1:
measure =
VAR _product = SELECTEDVALUE(data2[product])
VAR _list =
CALCULATETABLE(
VALUES(data[product]),
REMOVEFILTERS(data[product])
)
VAR _result = IF(_product IN _list, 1, 0)
RETURN _result
it worked like:
Thank you @FreemanZ ! Didn't work at first for me because my model was actually a bit more complex from the example I provided, but with slight modifications I was able to use your solution. 🙂
User | Count |
---|---|
65 | |
59 | |
55 | |
53 | |
30 |
User | Count |
---|---|
180 | |
88 | |
72 | |
48 | |
46 |