Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago
Solved

Show Two Lines on the same Chart from same Column in Power BI Desktop

I was trying to show two values from a same column on the same Lines Chart, but cant find a simple way to do it.

I have a Table like this:

DateTeamValue

01/02/2023Team 10
03/02/2023Team 130
11/02/2023Team 145
15/02/2023Team 115
02/02/2023Team 26
05/02/2023Team 218
11/02/2023Team 20
16/02/2023Team 237

 

I'm trying to show Team 1 and Team 2 in two different Lines on the chart, and on X axis the Dates (and add a slide). It looks like this:

If I add a filter it shows only one, and the only way I found to solve it is create two New Columns in Power Query (the first only shows the Values from Team 1 and the Second only from Team 2).

 

Is there another way to solve it? 

 

Thanks

  • Hi Anonymous 
    You can achieve your goals in 2 ways :

    1. just put your team to a legend :

     

     

     


    2 create measures for every team, like :

    Total team 1 = CALCULATE(sum('Table'[Value]),'Table'[Team]= "team 1")
    Total team 2 = CALCULATE(sum('Table'[Value]),'Table'[Team]= "team 2")

    and than put both of your measures on Y axis:

    Link to the sample file 

     

    Please consider Accepting it as the solution to help the other members find it more quickly

2 Replies

  • Hi Anonymous 
    You can achieve your goals in 2 ways :

    1. just put your team to a legend :

     

     

     


    2 create measures for every team, like :

    Total team 1 = CALCULATE(sum('Table'[Value]),'Table'[Team]= "team 1")
    Total team 2 = CALCULATE(sum('Table'[Value]),'Table'[Team]= "team 2")

    and than put both of your measures on Y axis:

    Link to the sample file 

     

    Please consider Accepting it as the solution to help the other members find it more quickly