Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
I just started with power Bi, and facing a small issue if you can help today please:
I have this table below and need to create a slicer for each column (A prod, B prod and so on)
And in the slicer if I select "A prod" the card should give the summation of all the values in A prod, same for other columns. Even Pie chart or the stacked column graph should change dynamically showing only the product which was selected.
A prod | B Prod | C Prod | D Prod |
0.310262 | 0.867506 | 0.067422 | 0.64718 |
0.054977 | 0.553923 | 0.789983 | 0.234929 |
0.984847 | 0.938926 | 0.194394 | 0.215597 |
0.939773 | 0.230516 | 0.780629 | 0.045914 |
0.923188 | 0.084872 | 0.251023 | 0.570317 |
0.9107 | 0.563052 | 0.566702 | 0.861772 |
0.816641 | 0.608547 | 0.801992 | 0.429707 |
0.372914 | 0.187926 | 0.344487 | 0.774162 |
0.453982 | 0.920273 | 0.519218 | 0.606966 |
0.054639 | 0.110996 | 0.611196 | 0.110195 |
0.679741 | 0.338945 | 0.128494 | 0.044924 |
0.021261 | 0.171755 | 0.853818 | 0.677499 |
0.509355 | 0.49844 | 0.719311 | 0.565606 |
0.665335 | 0.957441 | 0.452926 | 0.551319 |
0.264421 | 0.481684 | 0.407291 | 0.59328 |
0.493171 | 0.476781 | 0.779919 | 0.485332 |
0.080403 | 0.031454 | 0.762233 | 0.046526 |
0.899111 | 0.734676 | 0.265006 | 0.426943 |
0.127721 | 0.073364 | 0.006953 | 0.431879 |
0.572504 | 0.872879 | 0.955715 | 0.270049 |
0.210304 | 0.763487 | 0.478718 | 0.545109 |
0.921953 | 0.407865 | 0.504224 | 0.770659 |
0.144875 | 0.500462 | 0.534486 | 0.858421 |
0.991807 | 0.717868 | 0.386266 | 0.208436 |
Your help would be greatly appreciated
Solved! Go to Solution.
Hi, @Palavs
Please check the below.
I am not sure if I understood your question correctly, but one of the many ways I selected is to transform the table like below. In the power query editor, select four columns and click unpivot. Then the table can be transformed to the below.
Please check the pbix file's link down below.
https://www.dropbox.com/s/s96ml2cxuo3jso0/palavs.pbix?dl=0
Hi, My name is Jihwan Kim.
If this post helps, then please consider accept it as the solution to help other members find it faster, and give a big thumbs up.
Linkedin: linkedin.com/in/jihwankim1975/
Twitter: twitter.com/Jihwan_JHKIM
If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.
Hi @Palavs
If you don't want to change your data model, you can try my way to get summation by dax.
Firstly, we need to build a slicer table.
Build a calculated column as below.
Summation =
SWITCH (
TRUE (),
Slicer[Category] = "A Prod", SUM ( 'Table'[A prod] ),
Slicer[Category] = "B Prod", SUM ( 'Table'[B Prod] ),
Slicer[Category] = "C Prod", SUM ( 'Table'[C Prod] ),
SUM ( 'Table'[D Prod] )
)
Result:
Best Regards,
Rico Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Palavs
If you don't want to change your data model, you can try my way to get summation by dax.
Firstly, we need to build a slicer table.
Build a calculated column as below.
Summation =
SWITCH (
TRUE (),
Slicer[Category] = "A Prod", SUM ( 'Table'[A prod] ),
Slicer[Category] = "B Prod", SUM ( 'Table'[B Prod] ),
Slicer[Category] = "C Prod", SUM ( 'Table'[C Prod] ),
SUM ( 'Table'[D Prod] )
)
Result:
Best Regards,
Rico Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi, @Palavs
Please check the below.
I am not sure if I understood your question correctly, but one of the many ways I selected is to transform the table like below. In the power query editor, select four columns and click unpivot. Then the table can be transformed to the below.
Please check the pbix file's link down below.
https://www.dropbox.com/s/s96ml2cxuo3jso0/palavs.pbix?dl=0
Hi, My name is Jihwan Kim.
If this post helps, then please consider accept it as the solution to help other members find it faster, and give a big thumbs up.
Linkedin: linkedin.com/in/jihwankim1975/
Twitter: twitter.com/Jihwan_JHKIM
If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.
User | Count |
---|---|
139 | |
113 | |
103 | |
73 | |
63 |
User | Count |
---|---|
136 | |
125 | |
107 | |
70 | |
61 |