Forum Discussion

bullius's avatar
bullius
Helper V
10 years ago
Solved

Line chart with subtotals and total

Hello,   I am trying to create a line chart with three lines: Line A, Line B and the Total of Line A and B. At the moment, I can only do Line A and B OR the Total.    Is there a way of having all...
  • v-qiuyu-msft's avatar
    10 years ago

    Hi bullius,

     

    In your scenario, I would suggest you create three measures: values for LineA, LineB and Total. Then place those three measures in chart Values property, without dragging any value to Legend property. Please refer to screenshots below:

     

    Aliqui = CALCULATE(SUM(SalesFact[Units]),Manufacturer[Manufacturer]="Aliqui")

     

    Natura = CALCULATE(SalesFact[Total Units],Manufacturer[Manufacturer]="Natura")

     

    Total = CALCULATE(SUM(SalesFact[Units]),Manufacturer[Manufacturer]="Aliqui") + CALCULATE(SUM(SalesFact[Units]),Manufacturer[Manufacturer]="Natura")

     

     

    If you have any question, please feel free to ask.

     

    Best Regards,
    Qiuyun Yu