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 have a simple data set as below.
I want to add a slicer. When I choose a city from this slicer I want Sum of Price Column stay as it is(not filtered) but Total Price for selected City shows data for City A only.
My final goal is to see below visual.
I think I need to create another table for city and leave it not connected and create a measure but couldn't figure it out.
Thanks in advance.
Solved! Go to Solution.
Hi @vsahin,
Here is my solution:
1 - Create a new table with all City names like this:
And use this new table as a slice in the report like this:
After that create this new two measures:
SumPrice = SUM(T_CityData[Price])
NewSumCity =
VAR _City = SELECTEDVALUE('T_CityData Off'[City])
VAR _Result =
CALCULATE(
[SumPrice],
FILTER(
ALL(T_CityData),
T_CityData[City] = _City && T_CityData[Item] = SELECTEDVALUE(T_CityData[Item])
)
)
RETURN
_Result
Build your matrix table like this:
And it should works like you want.
Note: You always need to have one City selected and have only one City selected on the slicer.
Proud to be a Super User!
You're welcome.
Proud to be a Super User!
Hi @vsahin,
Here is my solution:
1 - Create a new table with all City names like this:
And use this new table as a slice in the report like this:
After that create this new two measures:
SumPrice = SUM(T_CityData[Price])
NewSumCity =
VAR _City = SELECTEDVALUE('T_CityData Off'[City])
VAR _Result =
CALCULATE(
[SumPrice],
FILTER(
ALL(T_CityData),
T_CityData[City] = _City && T_CityData[Item] = SELECTEDVALUE(T_CityData[Item])
)
)
RETURN
_Result
Build your matrix table like this:
And it should works like you want.
Note: You always need to have one City selected and have only one City selected on the slicer.
Proud to be a Super User!
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 59 | |
| 46 | |
| 39 | |
| 38 | |
| 21 |
| User | Count |
|---|---|
| 176 | |
| 131 | |
| 118 | |
| 82 | |
| 54 |