Forum Discussion
Dynamic change for Yaxis line graph and Matrix visual
Hi Anonymous Ashish_Mathur
| Gross A | Gross B | Gross C | Net A | Net B | Net C |
| 3.4 | 12.3 | 40.2 | 13.33 | 12.4 | 62.4 |
| 22.5 | 12.2 | 10 | 2.4 | 10.4 | 12.4 |
| 10.3 | 10 | 6.7 | 50 | 45 | 30 |
along with this i have date column in same table.
I have 2 visuals:
1. lin graph- Xaxis = Date; y=?
2. Matrix Visual- Date; Values=?
Now i want a slicer which should have a dropdown of all 6 column names:
Gross A
Gross B
Gross C
Net A
Net B
Net C
when a user selects Gross A , for line graph Y axis should show Sum of Gross A and Matrix Visual should show normal values as value which is available in table.
Likewise for Gross B, Gross C, Net A, Net B, Net C.
let me know any further information required.
Hi ghouse_peer
Please try this:
I add a date column for the reference.
Transform data > Select all the columns without date column > Transform > Unpivot Columns:
Close & Apply
Then add matrix and line chart:
The result is as follow:
Best Regards
Zhengdong Xu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- ghouse_peer2 years ago
Post Patron
the workaround and solution you have provided is direct.
But in my requirement i dont want to do any transformation because i do have other columns which may get affected.
As you have taken same column in matrix visual, but in my scenario there will be different columns and value should appear w.r.t slicer and same thoing for Line chart as well
- Anonymous2 years agoNot applicable
Hi ghouse_peer
Do any transformation may get some other columns affected.
But you know, power bi's calculations are column-based, and if you don't convert them, you might do a lot of redundant calculations and even fail to get the correct outcome most of the time.
Best Regards
Zhengdong Xu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.