Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Hi,
I have the following columns are Id, Code, Result1 and Result2 in data table. The same id and code has two different status.
I am currently using two different visual for same id and code for Result1 and Result2.
If it possible build one visual for both Results based on the id and code ( Result 1 and result2) by using turn on/off result column.
I am trying to combine two different visual report into one Power BI visual report by using group or special buttons.
Example:
Currently visual setting:
Result1 and Result2 column on values, code column on row and Id on columns.
If turn off the Result2 then it will showing only Result1 values or If turn off the Result1 then it will showing Result2 values only.
Data:
ID | Code | Result1 | Result2 |
1S | A | Win | Id1 |
1S | A | Win | Id1 |
1S | B | Win | Id1 |
1S | C | Win | Id1 |
1S | D | Win | Id1 |
1S | D | Win | Id1 |
2S | A | Loss | Id2 |
2S | B | Loss | Id2 |
2S | C | Loss | Id2 |
2S | D | Loss | Id2 |
3S | A | Loss | Id3 |
3S | A | Loss | Id3 |
4S | A | Win | Id4 |
4S | A | Win | Id4 |
5S | A | Win | Id5 |
5S | B | Win | Id5 |
6S | C | Loss | Id6 |
6S | D | Loss | Id6 |
Solved! Go to Solution.
Create a new table either via the query editor or a DAX calculated table.
As a calculated table, for example:
Slicer = DATATABLE ( "Result", STRING, {{"Result 1"}, {"Result 2"}} )
See attached.
Here is the file for your reference.
@AlexisOlson , Thanks for your reply.
Desired Result:
I am trying to control Result1 and Result2 columns by using slicer. If I select Result1 column then it will only showing Result1 row, columns and value in visual (ignore the Result2 values and headers in visual). And the same logic apply for Result1 as well.
Current method:
I am currently using two differnt visual for Result1 and Result2 in visual. I would like to use one visual for both results by using slicer for result column.
Example:
Selection only for Result1 only.
Selection only for Result2 only.
Define a new table Slicer with a single column "Result 1" and "Result 2".
Then you can define a measure
VarResult =
SWITCH (
SELECTEDVALUE ( Slicer[Result] ),
"Result 1", SELECTEDVALUE ( Data[Result 1] ),
"Result 2", SELECTEDVALUE ( Data[Result 2] )
)
Can you please advise one more thing here, I would like achieve the same result by using New calculate column instead of measure. Is that possible?
A calculated column cannot read a slicer, so no, there isn't an equivalent for a calculated column.
Thanks for your reply and advise.
Hi @AlexisOlson
Thank you so much for your reply and help.
I am struggling for step 1 so could you please kindly advise.
"Define a new table Slicer with a single column "Result 1" and "Result 2"
Could you please attached your final results final it's really help to understand the solution.
This is somthing new for me to learn it.
Hi @AlexisOlson
Thanks so much for your quick response and support.
This is really amazing and now I can control the status with in the same visual.
And more question regarding this topic.
How can I apply the conditional formatting here.
I used lot of different colours codes for both results.
Now how can I apply the conditional formatting according to the results 1 and result 2.
That sounds like a separate question.
Thanks for your reply and advice.
I'm not completely sure what the desired result is. A quick way to switch between these three views?
User | Count |
---|---|
93 | |
83 | |
77 | |
71 | |
65 |
User | Count |
---|---|
114 | |
101 | |
96 | |
65 | |
60 |