Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hi All,
I need to filter the values from the slicer, so if I select the seller only shows the sell out values & when I choose the manufacuter show the in warehouse values & when I choose the shop, keeps the shop values
Is it possible to do this?
Note: I have many other charts in the same page all filtered by the same slicer
and here is a text sample
| userTypeName | QTY | scanAction | created at | Product Type | Unit Price |
| manufacturer | 1859 | IN Warehouse | 2024-05-22T17:22:09.187Z | Lap Top | 6 |
| Shop | 35 | Shop | 2024-05-22T17:22:08.117Z | Lap Top | 6 |
| Shop | 3 | Shop | 2024-05-22T17:12:17.947Z | Headphones | 292 |
| Shop | 35 | Shop | 2024-05-22T16:58:37.601Z | Lap Top | 6 |
| manufacturer | 8 | Sell Out | 2024-05-22T16:26:11.257Z | Computer | 385 |
| Seller | 8 | Sell Out | 2024-05-22T16:26:11.257Z | Computer | 385 |
| manufacturer | 8 | IN Warehouse | 2024-05-22T16:25:17.019Z | Computer | 385 |
| Seller | 8 | IN Warehouse | 2024-05-22T16:25:17.019Z | Computer | 385 |
| Seller | 9 | Sell Out | 2024-05-22T16:21:30.672Z | Headphones | 188 |
| manufacturer | 11 | Sell Out | 2024-05-22T16:21:30.672Z | Headphones | 188 |
| manufacturer | 11 | IN Warehouse | 2024-05-22T16:21:22.361Z | Headphones | 188 |
| Seller | 9 | IN Warehouse | 2024-05-22T16:21:22.361Z | Headphones | 188 |
| manufacturer | 10 | Sell Out | 2024-05-22T16:20:40.613Z | Headphones | 292 |
Solved! Go to Solution.
Hi @Asmaa-elsheikh ,
Create a calculated column to identify which rows should be displayed based on the userTypeName selection.
DisplayFlag =
SWITCH(
TRUE(),
[userTypeName] = "Seller" && [scanAction] = "Sell Out", 1,
[userTypeName] = "Manufacturer" && [scanAction] = "IN Warehouse", 1,
[userTypeName] = "Shop", 1,
0
)
Then create measures that dynamically return values based on the slicer selection.
FilteredScanAction =
VAR SelectedUserType = SELECTEDVALUE('Table'[userTypeName])
RETURN
SWITCH(
TRUE(),
SelectedUserType = "Seller", CALCULATE(SUM('Table'[QTY]), 'Table'[scanAction] = "Sell Out"),
SelectedUserType = "Manufacturer", CALCULATE(SUM('Table'[QTY]), 'Table'[scanAction] = "IN Warehouse"),
SelectedUserType = "Shop", CALCULATE(SUM('Table'[QTY]), 'Table'[scanAction] = "Shop"),
BLANK()
)
Best Regards,
Adamk Kong
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Asmaa-elsheikh ,
Create a calculated column to identify which rows should be displayed based on the userTypeName selection.
DisplayFlag =
SWITCH(
TRUE(),
[userTypeName] = "Seller" && [scanAction] = "Sell Out", 1,
[userTypeName] = "Manufacturer" && [scanAction] = "IN Warehouse", 1,
[userTypeName] = "Shop", 1,
0
)
Then create measures that dynamically return values based on the slicer selection.
FilteredScanAction =
VAR SelectedUserType = SELECTEDVALUE('Table'[userTypeName])
RETURN
SWITCH(
TRUE(),
SelectedUserType = "Seller", CALCULATE(SUM('Table'[QTY]), 'Table'[scanAction] = "Sell Out"),
SelectedUserType = "Manufacturer", CALCULATE(SUM('Table'[QTY]), 'Table'[scanAction] = "IN Warehouse"),
SelectedUserType = "Shop", CALCULATE(SUM('Table'[QTY]), 'Table'[scanAction] = "Shop"),
BLANK()
)
Best Regards,
Adamk Kong
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 39 | |
| 37 | |
| 33 | |
| 32 | |
| 29 |
| User | Count |
|---|---|
| 133 | |
| 88 | |
| 85 | |
| 68 | |
| 64 |