Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I need an expression to just display the last 6 months data only on my staright table..I have a Month and year column
try this
Month Need to be your monthfield
Monthnum contains month number, if not available use other date functions
sum({<Month=,Monthnum={'>=$(max(Monthnum)-1)'}>}
alternate:
sum({<Month=,Datefield={'>=$(monthstart(addmonths(max(Datefield)-6)))'}>}
SUM( {< Year = {$(=Max(Year))}
, Month = {">$(=Max(Month)-6)<=$(=Max(Month))"}
>} YOURFIELD )
Hi try this
*Provided : Your Month is in 'MMM' format (JAN,FEB,...etc.,) and aggregating on sales ...
Sum({$<[Month]={">=$(=Date(AddMonths(Max(Month), -6), 'MMM'))<=$(=Date(Max(Month),'MMM'))"}>}[Sales])
look at the attachment
It depends if you want to show the last six months since today or the last six months since the last date selected.
(Updating the previous response)
SUM( {< Year = {$(=Year(Today()))}
, Month = {">$(=Month(Today())-6)<=$(=Month(Today())"}
>} YOURFIELD )
hi jose
i need
last six months since today
for ex: August ---> back to Feb
Jan should not be displayed.
Then you can use my proposal:
SUM( {< Year = {$(=Year(Today()))}
, Month = {">$(=Month(Today())-6)<=$(=Month(Today())"}
>} YOURFIELD )
But be careful with other date fields when you filter in the dashboard, you must put it in the set analisys with blank filter, for example {< Year = {$(=Year(Today()))}, Date=>}.
hi jose this is not working ... i need generic calculation condition in the general tab of the chart saying
year is max of year and month is 6 months data only
6 months data only means for example if today is 08/25/2016, you must show data from 02/25/2016 or from 02/01/2016?
In the fisrt case you mus use date instead year and month.