Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello Lovely people,
I am using a date field in one of my graphs, this field contains many years. in my graph, all the years are displayed :
I would like to display only 2016 data.
My date dimension :
=date(Floor([Date création]))
Any idea?
If your expression is e.g. Sum(Sales) change it to
Sum({<[Date création]={'>=1/1/2016'}>} Sales)
Hey there,
Please try this:
In script create this year field:
year( date(Floor([Date création])) ) as [Year création],
And put this as a field Dimension
=only({$<[Year création] = {2016}>} [Date création] )
Or in your expression add this set analysis in your expression
{$<[Year création] = {2016}>}
Best regards,
Data Architect MB
Create a tag for 2016 Year
Have you tried
Like dim is date field
And expression is simply call
Sum({<year = {'=$(max(year))'}>} sales)
Or
Sum({<year = {'2016'}>}sales)
Second expression will work, but first expression also can work until you don't have forecast data.
Hope this helpful
And how is your date field format looking
this is my expression :
=count(if(LONG_DESC_STATUS <> 'Demande traitée FO' AND LONG_DESC_STATUS <> 'Info fournie' AND LONG_DESC_STATUS <> 'Abandonné',CASE_ID ))
here's my expression, how to update it :
=count(if(LONG_DESC_STATUS <> 'Demande traitée FO' AND LONG_DESC_STATUS <> 'Info fournie' AND LONG_DESC_STATUS <> 'Abandonné',CASE_ID ))
Perhaps this
=count({<LONG_DESC_STATUS -= { 'Demande traitée FO', 'Info fournie', 'Abandonné'} >} CASE_ID )
Or this for 2016 data only
=count({<LONG_DESC_STATUS -= { 'Demande traitée FO', 'Info fournie', 'Abandonné'}, year = {'2016'} >} CASE_ID )
HI,
Shift this date(Floor([Date création])) calculation to script level
Load date(Floor([Date création])) as Created_Date
also calculate Year(date(Floor([Date création])) ) as YEAR
.
.
FROM Table;
Dimension:
Created_Date
Expression:
count({<LONG_DESC_STATUS={'*'}-{''Demande traitée FO'}, LONG_DESC_STATUS={'*'}-{'Info fournie'},
LONG_DESC_STATUS={'*'}-{'Abandonné'},YEAR={$(=max(YEAR))}>}CASE_ID )
Thanks,