Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
nleuck
Post Patron
Post Patron

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!

 

power bi current year months.png

1 ACCEPTED SOLUTION
v-juanli-msft
Community Support
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)

1.png

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.

View solution in original post

6 REPLIES 6
nleuck
Post Patron
Post Patron

@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!

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.

You have to decide which column need to use.

 

Arjunarao
Resolver I
Resolver I

Hi,

Please check this.

 

Total Mtd = TOTALMTD(SUM(Sales[Sales]),Sales[Date],YEAR(Sales[Date])=YEAR(TODAY()))

Total Mtd Current Month = TOTALMTD(SUM(Sales[Sales]),Sales[Date],Month(Sales[Date])=Month(TODAY()))

Total Ytd = TOTALYTD(SUM(Sales[Sales]),Sales[Date],YEAR(Sales[Date])=YEAR(TODAY()))

 

YTD MTD Sales.PNG

Download:

https://drive.google.com/open?id=1HxhA3ntDvEUQOSkMJD7DqKLll2QpLhhu

Ashish_Mathur
Super User
Super User

Hi,

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


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
v-juanli-msft
Community Support
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)

1.png

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.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.