Forum Discussion
icturion
4 years agoResolver II
Only show values for complete months
Hi, I have made a power bi report in which the results per month are presented compared to the same month a year earlier or the budget for that month. At the moment the month we are still in the ...
- 4 years ago
icturion ,
Complete month based Today =
var _max = if( day(today()) >=15 ,eomonth(today(),-1), eomonth(today(),-2) )
return
IF(Table[datecolumn] <=_max,1,0)
amitchandak
4 years agoSuper User
icturion ,
Complete month based Today =
var _max = if( eomonth(today(),0)=today(), Today() , eomonth(today(),-1) )
var _min = eomonth(_max,-1)+1
return
CALCULATE(sum('Table'[Qty]), FILTER(ALL('Date'),'Date'[Date] >= _min && 'Date'[Date] <=_max ) )
icturion
4 years agoResolver II
Hi amitchandak ,
based on your example I have now created the following and it works well:
Complete month based Today =
var _max = if( eomonth(today(),0)=today(), Today() , eomonth(today(),-1) )
return
IF(Table[datecolumn] <=_max,1,0)
I just heard from finance that the previous month may only be available if it is at least the 15th month of the current month. How can I best process this in the above formula?
- amitchandak4 years agoSuper User
icturion ,
Complete month based Today =
var _max = if( day(today()) >=15 ,eomonth(today(),-1), eomonth(today(),-2) )
return
IF(Table[datecolumn] <=_max,1,0)