Forum Discussion
DATESYTD problem in PB Onpremises (Remote Server)
- 4 months ago
Hi F_Reh
Your DAX is almost correct - the issue is not the function itself, it’s how the year-end parameter is being interpreted in newer versions of Microsoft Power BI.
Change it to:
Attendances FYTD = CALCULATE( Daily_Attendances[Total_Attendances], DATESYTD(DatesTable[Date], "03/31") )If it still misbehaves, then your issue is one of these (common in Report Server setups):
Your DatesTable is not marked as a Date Table
Relationship between DatesTable[Date] and fact table is broken/inactive
Daily_Attendances[Total_Attendances] is not a proper measure (should be SUM-based)
Hi F_Reh , Could you share which version exactly ? also can you try whether the small change in the format is helping you to fix the error:
instead of this
Attendances FYTD = CALCULATE(Daily_Attendances[Total_Attendances],DATESYTD(DatesTable[Date],"31/3"))
use
Attendances FYTD = CALCULATE(Daily_Attendances[Total_Attendances],DATESYTD(DatesTable[Date],"3/31"))
I recreated the scenario with some sample data both the measures are working for me .
Data model :
Sample data :
Op:
File :
Rag status.pbix
Thanks
If you found this helpful, please consider giving it a kudo and marking it as the accepted solution — it goes a long way in helping others facing the same issue.
For more Power BI tips and discussions, let’s connect on LinkedIn:
https://www.linkedin.com/in/natarajan-manivasagan
Cheers!