cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
lizrowden Regular Visitor
Regular Visitor

TOTALYTD Not working with Month Name

I am trying to work with TOTALYTD and can get it to work when I use Month Number from my Date table, but not with Month Name. Here is the background:

1.) I have a measure from my CFM table which looks like this:

# of Repair Calls = CALCULATE(DISTINCTCOUNT('CFM'[ServiceCallId]), Filter('CFM','CFM'[Partner Call Type] = "REPAIR"))
 

2.) I have the CFM table joined to a date table on the "DateAsInteger" field. This is my date table

Date Service =
ADDCOLUMNS (
CALENDAR (DATE(2009,1,1), DATE(2025,12,31)),
"DateAsInteger", FORMAT ( [Date], "YYYYMMDD" ),
"Year", YEAR ( [Date] ),
"Monthnumber", FORMAT ( [Date], "MM" ),
"YearMonthnumber", FORMAT ( [Date], "YYYY/MM" ),
"YearMonthShort",FORMAT ( [Date], "YYYY/mmm" ),
"MonthNameShort", FORMAT ( [Date], "mmm" ),
"MonthNameLong", FORMAT ( [Date], "mmmm" ),
"DayOfWeekNumber", WEEKDAY ( [Date] ),
"DayOfWeek", FORMAT ( [Date], "dddd" ),
"DayOfWeekShort", FORMAT ( [Date], "ddd" ),
"Quarter", "Q" & FORMAT ( [Date], "Q" ),
"YearQuarter", FORMAT ( [Date], "YYYY" ) & "/Q" & FORMAT ( [Date], "Q" ),
"Week Number",WEEKNUM([Date],1)
)
 
I tried to use the formula, but was unable to get the correct YTD number by month
YTD Repair Calls = TOTALYTD([# of Repair Calls],'Date Service'[Last Service Date])
 
If I use this formula, it works when I use Month Number in my visual, but not when I use Month Name.
YTD Repair Calls = TOTALYTD([# of Repair Calls],'Date Service'[Last Service Date], ALL('Date Service'[Month Number]))
 
See below:
TOTALYTD.PNG

Any help would be greatly appreciated.

 

2 ACCEPTED SOLUTIONS

Accepted Solutions
Highlighted
Super User I
Super User I

Re: TOTALYTD Not working with Month Name

Did you mark your date table as such?

How to Mark as Date Table.png

View solution in original post

lizrowden Regular Visitor
Regular Visitor

Re: TOTALYTD Not working with Month Name

That is my problem. I created this date table so long ago and I never marked it as a date table. Thank you all very much

View solution in original post

5 REPLIES 5
Super User IV
Super User IV

Re: TOTALYTD Not working with Month Name

@lizrowden this should work, not sure where you are getting Last Service Data column

 

YTD Repair Calls = TOTALYTD([# of Repair Calls],'Date Service'[Date])





Did I answer your question? Mark my post as a solution.

Proud to be a Datanaut! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.





lizrowden Regular Visitor
Regular Visitor

Re: TOTALYTD Not working with Month Name

I renamed the column the was originally built as "Date" to "Last Service Date" using the 'Rename' option in the Fields pane in Power BI. Could that be causing it not to work?

Super User IV
Super User IV

Re: TOTALYTD Not working with Month Name

@lizrowden that shouldn't cause any issue. In my opinion it shoud work. Send me screeen shot of what you are seeing and not working. Also if possible share sample data/pbix file using onedrive/google drive.






Did I answer your question? Mark my post as a solution.

Proud to be a Datanaut! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.





Highlighted
Super User I
Super User I

Re: TOTALYTD Not working with Month Name

Did you mark your date table as such?

How to Mark as Date Table.png

View solution in original post

lizrowden Regular Visitor
Regular Visitor

Re: TOTALYTD Not working with Month Name

That is my problem. I created this date table so long ago and I never marked it as a date table. Thank you all very much

View solution in original post

Helpful resources

Announcements
Coming Soon: T-Shirt Design Contest

Coming Soon: T-Shirt Design Contest

Keep your eyes open for our upcoming T-shirt design contest!

Meet the 2020 Season 1 Power BI Super Users!

Meet the 2020 Season 1 Power BI Super Users!

It’s the start of a new Super User season! Learn all about the new Super Users and brand-new tiered recognition system.

Super User Challenge: Can You Solve These?

Super User Challenge: Can You Solve These?

We're celebrating the start of the New Super User season with our first ever Super User 'Can You Solve These?' challenge.

Power BI Desktop Update - February 2020

Power BI Desktop Update - February 2020

We are super excited for our update this month, as we are releasing two of our top community requests!

Power Platform Online Conference

Power Platform Online Conference

Join us for the first ever Power Platform Online Conference!

Top Solution Authors
Top Kudoed Authors