Forum Discussion
schoden
5 years agoPost Partisan
Apply Certain Date Range using ISBLANK
Hi Community, I have a measure to calculate total sales: M= SUM(Sales[sales]) Now I have put Date Range to show next 6 Months including current Month Feb 2021. N= ...
- 5 years ago
schoden , Try like
0 between range Measure = var _1= CALCULATE(SUM(Sales[sales]), DATESINPERIOD( Date, NOW(), 6 , MONTH)) +0 var _min = calculate(minx('Calendar', 'Calendar'[Date]) ,DATESINPERIOD( 'Calendar'[, NOW(), 6 , MONTH)) var _max = calculate(maxx('Calendar', 'Calendar'[Date]) ,DATESINPERIOD( 'Calendar'[, NOW(), 6 , MONTH)) return CALCULATE(if(max('Calendar'[Date]) <_min || max('Calendar'[Date]) >_max , BLANK(), _1))
amitchandak
5 years agoSuper User
schoden , Create a measure like below example
0 between range
Measure = var _1= SUM(sales[sales]) +0
var _min = minx(ALLSELECTED('Calendar'), 'Calendar'[Date])
var _max = maxx(ALLSELECTED('Calendar'), 'Calendar'[Date])
return
CALCULATE(if(max('Calendar'[Date]) <_min || max('Calendar'[Date]) >_max , BLANK(), _1))
- schoden5 years agoPost Partisan
hi amitchandak the measure still doesnt show zero for the blank months.
- amitchandak5 years agoSuper User
schoden , here min-max, need to be from six-month range.
- schoden5 years agoPost Partisan
Yes amitchandak I have put flag check for next 6 months. still doesnt show zero