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
Super User
Super User

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

Highlighted
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
Super User

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
Super User

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.





Super User
Super User

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

Highlighted
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
Can You Solve These Challenge

Challenge: Can You Solve These?

Find out how to participate in the first Power BI 'Can You Solve These?' challenge.

New Badges

Incoming: New and Improved Badges

Exciting news: We've given our badges an overhaul and added brand news ones.

Ask Amir Anything

Exclusive LIVE Community Event No. 2 – Ask Amir Anything

Next in our Triple A series: Ask Amir Netz questions about the latest updates, features and future.

Analytics in Azure virtual event

Analytics in Azure virtual event

Experience a limitless analytics service built to ingest, prep, manage, and serve data for immediate use in Power BI.

Users Online
Currently online: 328 members 3,310 guests
Please welcome our newest community members: