Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
I have a the following visual that is correct for the current year:
However when I choose 2021 for year the month card does not display December:
I realize that the measure calculating the last month needs to be filtered for year as well but I'm not sure what I need to include in order to do that.
The measure I created for the month is as follows: MaxMonth = (Format(Date(1, Month(MAX('DailyWeather'[Date])),1),"MMMM"))
Any help would be greatly appreciated!
Solved! Go to Solution.
@amitchandak - thank you for providing these options! The solution to my particular problem was solved with a much simpler solution. I created a measure that found the last date for the year subject to the filter and formatted it to reflect the month in text:
@CMccown , In below you have few option var
var _max = if(isfiltered('Date'),MAX( 'Date'[Date]) , eomonth(today(),0) )
var _max = if(isfiltered('Date'),MAX( 'Date'[Date]) , maxx(allselected(Table), Table[Date]) )
replace var _max as per need
MTD =
var _max = if(isfiltered('Date'),MAX( 'Date'[Date]) , today())
var _min = eomonth(_max,-1)+1 ,
return
CALCULATE([net] ,DATESBETWEEN('Date'[Date],_min,_max))
This Month =
var _max = eomonth(if(isfiltered('Date'),MAX( 'Date'[Date]) , today()),0)
var _min = eomonth(_max,-1)+1 ,
return
CALCULATE([net] ,DATESBETWEEN('Date'[Date],_min,_max))
Last Month =
var _max1 = if(isfiltered('Date'),MAX( 'Date'[Date]) , today())
var _max = eomonth(_max1,-1)
var _min = eomonth(_max1,-2)+1
return
CALCULATE([net] ,DATESBETWEEN('Date'[Date],_min,_max))
@amitchandak - thank you for providing these options! The solution to my particular problem was solved with a much simpler solution. I created a measure that found the last date for the year subject to the filter and formatted it to reflect the month in text:
User | Count |
---|---|
141 | |
113 | |
104 | |
78 | |
64 |
User | Count |
---|---|
136 | |
125 | |
107 | |
70 | |
61 |