Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more.
Get startedGrow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.
Hello
I have a slicer with alarm names and I need to switch appropriate set of columns acording to selected alarm name in a table visual.
For example:
If I select Alarm1 in my slicer, I need to see in a table visual columns A,B,C from my fact table.
then if I select Alarm2 I need to see columns B,D,E
I can`t unpivot columns , because I have around 82 milions of rows and around 100 columns. They are data from IoT.
I tried:
Dynamic_columns =
SWITCH(
SELECTEDVALUE('Alarm'[code]),
"Alarm1", SELECTCOLUMNS(Fact,"A",[SUM A], "B", [SUM B], "C", [SUM C]),
"Alarm2", SELECTCOLUMNS(Fact,"B", [SUM B], "D", [SUM D], "E", [SUM E]),
Blank() )
But it didn`t worked.
Can you help me?
this is Fact table:
Date | A | B | C | D | E |
01/01/2023 | 12.6 | 13.6 | 10.5 | 13.5 | 12.4 |
02/01/2023 | 13.6 | 14.6 | 11.5 | 14.5 | 13.4 |
03/01/2023 | 11.4 | 12.4 | 9.3 | 12.3 | 11.2 |
04/01/2023 | 6.7 | 7.7 | 4.6 | 7.6 | 6.5 |
05/01/2023 | 15 | 16 | 12.9 | 15.9 | 14.8 |
06/01/2023 | 1 | 2 | -1.1 | 1.9 | 0.8 |
07/01/2023 | 2 | 3 | -0.1 | 2.9 | 1.8 |
08/01/2023 | 13 | 14 | 10.9 | 13.9 | 12.8 |
09/01/2023 | 20 | 21 | 17.9 | 20.9 | 19.8 |
10/01/2023 | 7 | 8 | 4.9 | 7.9 | 6.8 |
this is Alarm table
code |
Alarm1 |
Alarm2 |
result I need:
Hi @Lucy8466
Can you look into the Field Parameter?
https://learn.microsoft.com/en-us/power-bi/create-reports/power-bi-field-parameters
https://www.youtube.com/watch?v=-nqEv2YXLsU
If solved your requirement, please mark this answer as SOLUTION.
If this comment helps you, appreciate your KUDOS 👍
Thanks
Pijush
Hello I watched the video ,
but I can`t see how it can help me. I don`t need a different breakdowns of 1 column, but I need to switch couple of columns in a table visual that are valid to show if I select Alarm1 in slicer and another set of columns if I select value Alarm2 in my slicer.
Maybe can you explain more how the field parameters can be used in this case?
thank you
Hi @Lucy8466
Can you please share sample data (excel format)
and
expected result in (excel or image)
Hello yes sure I just don`t know how to attach attachment. could you please send me in private message your email where can I send excel and simple pbi?
results should be:
@PijushRoy here it is:
Fact table
Date | A | B | C | D | E |
01/01/2023 | 12.6 | 13.6 | 10.5 | 13.5 | 12.4 |
02/01/2023 | 13.6 | 14.6 | 11.5 | 14.5 | 13.4 |
03/01/2023 | 11.4 | 12.4 | 9.3 | 12.3 | 11.2 |
04/01/2023 | 6.7 | 7.7 | 4.6 | 7.6 | 6.5 |
05/01/2023 | 15 | 16 | 12.9 | 15.9 | 14.8 |
06/01/2023 | 1 | 2 | -1.1 | 1.9 | 0.8 |
07/01/2023 | 2 | 3 | -0.1 | 2.9 | 1.8 |
08/01/2023 | 13 | 14 | 10.9 | 13.9 | 12.8 |
09/01/2023 | 20 | 21 | 17.9 | 20.9 | 19.8 |
10/01/2023 | 7 | 8 | 4.9 | 7.9 | 6.8 |
Alarm table with one column code:
code |
Alarm1 |
Alarm2 |
User | Count |
---|---|
86 | |
82 | |
68 | |
64 | |
55 |
User | Count |
---|---|
123 | |
100 | |
90 | |
83 | |
66 |