Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
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 |
---|---|
84 | |
79 | |
70 | |
47 | |
41 |
User | Count |
---|---|
108 | |
52 | |
50 | |
40 | |
40 |