Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
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))
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
114 | |
99 | |
82 | |
70 | |
60 |
User | Count |
---|---|
149 | |
114 | |
107 | |
89 | |
67 |