Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Andrei_Cusnir
I'm unable to reply to this post count in range.
I have to create a filter or button like below
Mon-Fri and Sat
So if the user selects Mon-Fri it will display in KPIs or charts those related data
if the user select Sat it will display only sat data.
any suggestions?
Hello,
create a variable name it e.g. vKPIValue, set it's value to 0.
Create a KPI object and write the following:
=IF($(vKPIValue)=0,
Count({<DayName={'Mon', 'Tue', 'Wed', 'Thu', 'Fri'}, Time={">=$(=Num(MakeTime(8,30,0)))<=$(=Num(MakeTime(20,0,0)))"}>}Date),
Count({<DayName={'Sat'}, Time={">=$(=Num(MakeTime(8,30,0)))<=$(=Num(MakeTime(13,30,0)))"}>}Date)
)
If you don't need the time restraint, simply remove it from the set analysis.
Create two buttons and give it the vKPIValue as the variable you want to change.
Name it Mon-Fr and it's value 0 and the other Sat and it's value 1 for example.
Sure. The table that contains our date value needs another field DayName.
You can try in script:
if(Weekday(Date)='Sat', 'Sat',
if(Match(Weekday(Date),'Mon','Tue','Wed','Thu','Fri')>0, 'Mon-Fri')) as DayName
Hello,
create a variable name it e.g. vKPIValue, set it's value to 0.
Create a KPI object and write the following:
=IF($(vKPIValue)=0,
Count({<DayName={'Mon', 'Tue', 'Wed', 'Thu', 'Fri'}, Time={">=$(=Num(MakeTime(8,30,0)))<=$(=Num(MakeTime(20,0,0)))"}>}Date),
Count({<DayName={'Sat'}, Time={">=$(=Num(MakeTime(8,30,0)))<=$(=Num(MakeTime(13,30,0)))"}>}Date)
)
If you don't need the time restraint, simply remove it from the set analysis.
Create two buttons and give it the vKPIValue as the variable you want to change.
Name it Mon-Fr and it's value 0 and the other Sat and it's value 1 for example.
Hi,
thanks for your response.
Instead of doing with set analysis. Can i do it in script create field values like
Mon-Fri
Sat
so that if user selects that data will display .
Sure. The table that contains our date value needs another field DayName.
You can try in script:
if(Weekday(Date)='Sat', 'Sat',
if(Match(Weekday(Date),'Mon','Tue','Wed','Thu','Fri')>0, 'Mon-Fri')) as DayName
How about the Pick Match formula?
I asked a similar question yesterday here: Pick Match vs If Match: grouping a dimension
=Pick(Match(FieldName,'Mon','Tue','Wed','Thur','Fri','Sat'), 'Mon-Fri', 'Mon-Fri', 'Mon-Fri', 'Mon-Fri', 'Mon-Fri', 'Sat')
Thanks for your suggestions.