March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
Hello
I am trying to implement a logic to use a slicer to apply a filter on another slider. For the sake of simplicity I will put a simple version of my use case.
I have a table with a value for each account with the following format
Account | Value |
A | 100 |
B | 150 |
C | -50 |
D | 150 |
So I have four measures of
A = CALCULATE( SUM( Table[Value] ), Table[Account] = "A" )
B = CALCULATE( SUM( Table[Value] ), Table[Account] = "B" )
C = CALCULATE( SUM( Table[Value] ), Table[Account] = "C" )
D = CALCULATE( SUM( Table[Value] ), Table[Account] = "D" )
First I want to create a new account without increasing my data model size or putting any extra rows so I created a new account F with a measure that is a calculation of:
E = [D] - ([A] + [B] + [C])
For me to be able to use this new account as a new "dimension", I created a disconnected table with my 5 values (A, B, C, D, E) and a switch measure to reflect the value of each so that I can use that new table to slice, along with the switch measure which will represent my value.
Solved! Go to Solution.
Let your data model do the work for you. Have a table with all blocks and wire it in. Then feed your slicer from that table.
Hi @aerizk ,
Thanks for the reply from lbendlin .
Create a disconnected table that should have one column, let is call it NewDim2, with three rows: Block1, Block2, and Block3.
Creates a measure that calculates the total value of each block based on the selection.
BlockValue=
VAR SelectedBlock = SELECTEDVALUE( 'NewDim2'[Block] )
RETURN
SWITCH(
SelectedBlock,
"Block1", [A] + [B],
"Block2", [A] + [B] + [C] + [D],
"Block3", [A] + [B] + [C] + [D] + [E],
BLANK()
)
Place the Block column in the Slicer and the BlockValue in the card visual object. The final page effect is as follows:
pbix file is attached.
If you have any further questions please feel free to contact me.
Best Regards,
Yang
Community Support Team
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
Thanks @v-huijiey-msft @lbendlin, this made it much easier. I did it slightly different within the same disconnected table which works similarly. Thanks a lot!
Block | Account |
Block1 | A |
Block1 | B |
Block2 | A |
Block2 | B |
Block2 | C |
Block3 | A |
Block3 | B |
Block3 | C |
Block3 | D |
Hi @aerizk ,
Thanks for the reply from lbendlin .
Create a disconnected table that should have one column, let is call it NewDim2, with three rows: Block1, Block2, and Block3.
Creates a measure that calculates the total value of each block based on the selection.
BlockValue=
VAR SelectedBlock = SELECTEDVALUE( 'NewDim2'[Block] )
RETURN
SWITCH(
SelectedBlock,
"Block1", [A] + [B],
"Block2", [A] + [B] + [C] + [D],
"Block3", [A] + [B] + [C] + [D] + [E],
BLANK()
)
Place the Block column in the Slicer and the BlockValue in the card visual object. The final page effect is as follows:
pbix file is attached.
If you have any further questions please feel free to contact me.
Best Regards,
Yang
Community Support Team
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
Let your data model do the work for you. Have a table with all blocks and wire it in. Then feed your slicer from that table.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
124 | |
87 | |
87 | |
70 | |
51 |
User | Count |
---|---|
205 | |
153 | |
97 | |
79 | |
69 |