Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago

how to stop the duplicate data on the line

the data should stop on Apr 2023 why it show end of year so how can i fix that as you see the below

 

4 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    You have a syntax error. It should be like this ALLEXCEPT('Aecom', 'Aecom'[Month])

    if you have a Month column you can create like this sample dax , if you dont. You have to get month value from your date value

    • Anonymous's avatar
      Anonymous
      Not applicable
      Column = IF(CALCULATE([Forecast Hours + Actual Hours],ALLEXCEPT('Date','Date'[Month]))=0,FALSE(),TRUE())




      Aecom Forecast Hours + Actual Hours running total in Date =
      CALCULATE(
          [Aecom Forecast Hours + Actual Hours],
          FILTER(
              ALLSELECTED('Date'[Date]),
              ISONORAFTER('Date'[Date], MAX('Date'[Date]), DESC)
          )
      )

       



  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Anonymous 

     

    I think you're making a cumulative total in the line chart, you have to perform a monthly total, apart from the formula you use. You should create a column where you will give "False" if the total for April is 0, and "True" if not.

    I tried to create a demo for you below. You could also create something similar to your own power bi about whether the month-based sum is 0 or not.

    If you keep only the "Trues" in the graph after you have created this structure. The areas you don't want will be gone.

     

    Best regards,

    Ezgi Naz Aslankara

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

    • Anonymous's avatar
      Anonymous
      Not applicable
      Column = IF(CALCULATE(SUM(Aecom[Hours]),ALLEXCEPT(Aecom ',' Aecom[ Hours]'[moth]))=0,FALSE(),TRUE())