Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
Hello Everyone!!
I am stuck at a dax problem.
I have two tables i.e Date table and File closure table( this table is having file closure month that is having a relationship with date table month). now i am using month name from date table into my slicer and want to count the number of row in file closure table from chosen month till the start of the year.
E.g. say i chosed march from slicer than the number of rows i want to count from file cosure table should be from january till march.
I cannot chose multiple months to add previous month data due to my schema limitations.
Kindly help me out in resolving this issue.
@Anonymous , In this case DatesYTD or TotalYTD should help. Make sure the Date table is marked as a date table
YTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESYTD('Date'[Date],"12/31"))
Last YTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESYTD(dateadd('Date'[Date],-1,Year),"12/31"))
This year Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESYTD(ENDOFYEAR('Date'[Date]),"12/31"))
Last year Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESYTD(ENDOFYEAR(dateadd('Date'[Date],-1,Year)),"12/31"))
Power BI — Year on Year with or Without Time Intelligence
https://medium.com/@amitchandak.1978/power-bi-ytd-questions-time-intelligence-1-5-e3174b39f38a
CALCULATE(COUNTROWS(FileTable),DATESYTD(Dates[Date]))