Forum Discussion
How do I combine two visuals reports into one Power BI visual report
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 |
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.
12 Replies
- AlexisOlson
Super User
I'm not completely sure what the desired result is. A quick way to switch between these three views?
- Saxon10
Post Prodigy
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.
- AlexisOlson
Super User
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] ) )- Saxon10
Post Prodigy
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.
- Saxon10
Post Prodigy
Here is the file for your reference.