Supplies are limited. Contact info@espc.tech right away to save your spot before the conference sells out.
Get your discountScore big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount
Hiya,
I am making some KPI cards, and am wishing to link the target values to the relative date slicer. (weeks, months, etc)
For example, when I choose "Last 2 months", I would like to get a "Previous Month" target.
When I choose "Last 2 weeks", I would like to get a "Previous Week" target.
I could not figure out how to 'extract' that input as some sort of unit to put in a measure.
Help would be much appreciated!
Solved! Go to Solution.
@Anonymous , Try measure like
Last month =
var _max1 = if(isfiltered('Date'),Min( 'Date'[Date]) , today())
var _max = eomonth(_max1,-1)
var _min = eomonth(_max1,-2)+1
return
CALCULATE([net] ,DATESBETWEEN('Date'[Date],_min,_max))
Last week =
var _max1 = if(isfiltered('Date'),Min( 'Date'[Date]) , today()) -7
var _max = _max1 - weekday(_max,2)+7
var _min = _max1 - weekday(_max,2)+1
return
CALCULATE([net] ,DATESBETWEEN('Date'[Date],_min,_max))
@Anonymous , Try measure like
Last month =
var _max1 = if(isfiltered('Date'),Min( 'Date'[Date]) , today())
var _max = eomonth(_max1,-1)
var _min = eomonth(_max1,-2)+1
return
CALCULATE([net] ,DATESBETWEEN('Date'[Date],_min,_max))
Last week =
var _max1 = if(isfiltered('Date'),Min( 'Date'[Date]) , today()) -7
var _max = _max1 - weekday(_max,2)+7
var _min = _max1 - weekday(_max,2)+1
return
CALCULATE([net] ,DATESBETWEEN('Date'[Date],_min,_max))
User | Count |
---|---|
12 | |
11 | |
8 | |
6 | |
6 |
User | Count |
---|---|
25 | |
19 | |
14 | |
10 | |
7 |