Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all
i have field quarter
2017Q1
2017Q2
2017Q3
2017Q4
2018Q1
2018Q2
2018Q3
so i want to be default selection with last four quarters when ever i open the dashboard.
I guess, simple rank() could work here.
Search String ='=Rank(Quarter)<5'
try the same search string in OnOpen trigger.
Do you have date field? If so, I suggest you to work from Date field like for OnOpen Trigger using DateField is the field and String like below.
='>=' & Date(QuarterStart(Max(DateField), -4)) & '<=' & Date(Max(DateField))
i dont have date field anil. from database directly getting that field.
I assume that your Quarter is a string what meant that there is no easy way to calculate with the values but you could create a date from it, for example with something like: date(date#('2017Q1', 'YYYYQM'))
But easier in your case should be to load your data sorted to Quarter and using:
autonumber(Quarter) as QNumber
and then your condition within the trigger could look like
= '>=' & max(QNumber) - 4
- Marcus
its not working
i have created autonumber(Quarter) as QNumber
and in onopen trigger
field= QNumber
string=
= '>=' & max(QNumber) - 4
but its not giving the result.
hI
ATTACHING THE SAMPLE
I guess, simple rank() could work here.
Search String ='=Rank(Quarter)<5'
try the same search string in OnOpen trigger.
Does it select the wrong quarters or happens nothing? The autonumber-approach worked only if the data are loaded with a proper sorting. Further worked with only one parameter if it's used once - by applying it multiple times a second parameter must be specified.
Whereby I think the solution from Tresesco is even more easier.
- Marcus
yes tresesco solution is working perfect.
but one doubt i have here i have given background color for dimension but it is not taking all values why this is happening?