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!Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.
I have a simple measure, as shown below, that calculates the number of months passed YTD. This measure feeds into an annualized figure. My issue is that a slicer that is used is messing up the calculation. I need to adjust this formula to omit any slicer input from its calcuation. I tried the All() function with no luck.
MonthsPassed = CALCULATE ( COUNTROWS ( SUMMARIZE ( 'Master Sheet', Dates[Month Year] ) ), DATESYTD ( Dates[Date] ))
Solved! Go to Solution.
That you can get like
month(date(year(today()), month(today())-1,1))
@JMAlloway , Try like
MonthsPassed = CALCULATE ( distinctcount( Dates[Month Year] ) , DATESYTD ( Dates[Date]))
or add column from fact to check null
MonthsPassed = CALCULATE ( distinctcount( Dates[Month Year] ) , DATESYTD ( Dates[Date]), filter('Master Sheet',not(isblank('Master Sheet'[Date] ) )))
Unfortunatly, the first suggestion yields the vallue '12' and the second suggestion yields the value '5'. At the end of the day, all I need is a measure that gives me the number '8' (if the current month is September) or '9' (if the month is October), etc.
That you can get like
month(date(year(today()), month(today())-1,1))