Forum Discussion

erdinch's avatar
erdinch
Helper I
6 years ago
Solved

Weekly graph data and YTD data in one chart

Hello, I am having one monthly measure refelected in bar chart and target shown as line.  That measure1 is calculated based on data in table1. at the end of the same graph I would like to have Year...
  • v-gizhi-msft's avatar
    v-gizhi-msft
    6 years ago

    Hi,

     

    Please try to create a new table by Enter Data:

    Create the relationship with original table by one-to-many:

    Then create a measure:

    Measure 2 = IF(MAX('Table (2)'[Month])="TotalAverage",CALCULATE(SUM('Table'[Sales]),ALLSELECTED('Table')),SUM('Table'[Sales]))

    Choose the new table's [Month] and this measure as clustered column chart.

    If you want to sort Month from 'January' to 'December', please add an index column in Query Editor.

    After Apply&Close, sort [Month] by [Index], the result shows:

    Here is my test pbix file:

    pbix 

    Hope this helps.

     

    Best Regards,

    Giotto Zhi