Forum Discussion

nleuck's avatar
nleuck
Post Patron
7 years ago
Solved

Display current year months data

Hello,

 

I need some help with how to display Current YTD totals by Month. If you look at the picture I have Months as my columns. The values are a created measure using TotalYTD. But I would expected to only see Jan, Feb, Mar, Apr, and May. The other months listed are from last year which I only want data from current year. Does anyone have any ideas on how to do this?

 

Thanks!

 

  • Hi nleuck 

    I can reproduce your problem.

    To slove this , create a measure

    Total Mtd = TOTALMTD(SUM(Sheet1[Value]),Sheet1[date],YEAR(Sheet1[date])=YEAR(TODAY()))
     or
    Total Ytd = TOTALYTD(SUM(Sheet1[Value]),Sheet1[date],YEAR(Sheet1[date])=YEAR(TODAY()))

    (they show same results in a matrix)

    Best Regards
    Maggie

     

    Community Support Team _ Maggie Li
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

6 Replies

  • v-juanli-msft's avatar
    v-juanli-msft
    Community Support

    Hi nleuck 

    I can reproduce your problem.

    To slove this , create a measure

    Total Mtd = TOTALMTD(SUM(Sheet1[Value]),Sheet1[date],YEAR(Sheet1[date])=YEAR(TODAY()))
     or
    Total Ytd = TOTALYTD(SUM(Sheet1[Value]),Sheet1[date],YEAR(Sheet1[date])=YEAR(TODAY()))

    (they show same results in a matrix)

    Best Regards
    Maggie

     

    Community Support Team _ Maggie Li
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

  • Hi,

    To your matrix visual, drag Year from the Calendar Table to the Column section.

  • v-juanli-msft  and Arjunarao 

     

    Thank you for your responses, but my biggest problem is I don't have one specific date column. I have two DateAssigned and DateCompleted. If I want to find the how many classes were completed in a month I can get two different answers depending on which column my created Month column is associated to (either DateAssigned or DateCompleted). This then has the opposite affect on a measure when I'm trying to find out the completion percentage for the current month. Unfortnately, I'm beginning to feel like this may be too complicated even though it should be straight forward calculations.

     

    If you have any other ideas let me know.

     

    Thanks again!

    • v-juanli-msft's avatar
      v-juanli-msft
      Community Support

      Hi nleuck 

      Since you want to find the how many classes were completed in a month,

      please create Month column associated to DateCompleted.

       

      Is this problem sloved? 

      If it is sloved, could you kindly accept it as a solution to close this case?

      If not, please let me know.

       

      Best Regards

      Maggie

      Community Support Team _ Maggie Li
      If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.