Forum Discussion
TOTALYTD works, TOTALMTD does not - same data
- 9 years ago
Hey mc625569,
It is definitely behaving strange. I tested a few things and found that if I add a slicer to the page for "MonthNameLong" from the 'Date Table' and select "January", then the MTD populates correctly. Also, you can get the MTD to populate by changing the formulas for both MTD and YTD to go off the "Inspections[DateNoTime]" column instead of the Date column from the 'Date Table'. See below:
Hope this helps,
Alan
Hey mc625569,
Can you provide some more information on your situation?
I tested the 2 formulas and they worked correctly on my data set (Excel file). Make sure there are no slicers/filters on the table you are working on. Also, make sure there formulas are used to make measures not columns. See below:
Hope this helps,
Alan
I posted my file to one drive.
What I'm hoping ot create is the monthly total of records for the current month, so whatever the current month is, they see the total so far this month, that's it - do not need a daily running total or anything like that.
So in this case we have 35 records in the inspection table that have a date of January 2017 - so they should see "35"
instead they see blank. If I use the YTD instead of MTD on the same data they do in fact see "35" which is the correct number.
I do have to create a second date field that doesn't use timestamps so I can create a relationship to the date table - you will see that in the inspections table.
- alanhodgson9 years agoSolution Supplier
Hey mc625569,
It is definitely behaving strange. I tested a few things and found that if I add a slicer to the page for "MonthNameLong" from the 'Date Table' and select "January", then the MTD populates correctly. Also, you can get the MTD to populate by changing the formulas for both MTD and YTD to go off the "Inspections[DateNoTime]" column instead of the Date column from the 'Date Table'. See below:
Hope this helps,
Alan
- Anonymous9 years agoNot applicable
Hi alanhodgson, mc625569, et al
Just wondering if anyone understands why this happens? I have the exact same scenario when I base the TOTALQTD and TOTALMTD measures on the date table they don't work, when TOTALYTD does, but when I base it on the date in the fact table they do work.
Odd or am I missing something here?
Casos Nuevos YTD = TOTALYTD([Casos Nuevos];Calendario[Date].[Date]) - OK
Casos Nuevos MTD = TOTALMTD([Casos Nuevos];Calendario[Date].[Date]) - Not OK
Casos Nuevos MTD = TOTALMTD([Casos Nuevos];Solicitudes[Fecha_Solicitud]) - OK
Many thanks!
Matt
- eerba28 years agoFrequent Visitor
i'm having the same issue. both my QTD and YTD work as expected but the MTD has many blanks in my table. I added January to the table visual filter and that fixed it but, is there a way to built this into the measure instead of using visual filters? What is causing the MTD measure to behave diferently than QTD and YTD?
i'm using dates from a Time.Date dimension in a cube with no gap in dates.
- beachamtresa9 months agoNew Member
This post should not be marked as solved since its not solved in the comments. same issues.