Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Filter Expression need to check

Hi Folks,

I have a FIlter i.e., Time

Time

-------

Quarter

Week

When i select Quarter it shows Monthly Data.

When i select Week its want to show  Week only, But here it was not showing weekly. Its showing Monthly, i want to correct it.

If(GetFieldSelections(FilterFreq)='Quarterly',QuarterFlag,

If(GetFieldSelections(FilterFreq)='Weekly',WeekFlag,QuarterFlag))

is it correct? can you check and help? -- its not working correctly..

Sub2u444

21 Replies
Not applicable
Author

Hi Kiran Kumar,

sorry unable to share, i have little bit urgent..

Thanks for your quick response..

Sub2u444

Not applicable
Author

Hi Nagaraj,

I used above one, but it shows wrong.

i shared the expr's what ever i used in my app

Sub2u444

Kushal_Chawda

Put below expression in bar chart

If(GetFieldSelections(FilterFreq)='Quarterly',QuarterFlag,

If(GetFieldSelections(FilterFreq)='Weekly',WeekFlag,QuarterFlag))

Not applicable
Author

Thanks for the reply, i already check with this also. But not working.

Let me share some more info..

LOAD * INLINE

[FilterFreq,

Quarterly,

Weekly

];

Load 

     Ticket

     ,.............other fields....

    ,WeekFlag

    ,MonthFlag

    ,QuarterFlag

Resident Final

Order by Period;

This my script

Kushal_Chawda

What dimension and expression you are using in bar chart? what you want to display on bar chart?

Not applicable
Author

Based on Time Bucket - Quarterly / Weekly (Dimensions)

Expr :- Count(Ticket)

Ex:- If i select Quarterly -> It shows Monthly

If i select Weekly -> It shows Weekly based on selection i.e., single/multiple..

Sub2u444

Kushal_Chawda

create calculated dimension as like below

=aggr( if(FilterFreq='Quarterly', only(QuarterFlag),

if(FilterFreq='Weekly', only(WeekFlag),only(QuarterFlag))), QuarterFlag,WeekFlag)

or


if(FilterFreq='Quarterly', QuarterFlag,

if(FilterFreq='Weekly', WeekFlag,QuarterFlag))


Kushal_Chawda

Or i think best way is do the conditional

add two dimension in your char

1) QuarterFlag

2) WeekFlag

Now for QuarterFlag dimension write the enable conditional expression as

= if(getselectedcount(FilterFreq)=0 or FilterFreq='Quarterly',1,0)

for WeeklyFlag dimension write the below enable conditional expression

= if(FilterFreq='Weekly',1,0)



So when you will select Quarterly or nothing is selected dimension will be QuarterFlag and when you will select the Weekly dimension will be WeeklyFlag

Not applicable
Author

hi try this it's so simple

If(match(FilterFreq,'Quarterly'),QuarterFlag,

If(match(FilterFreq,'Weekly'),WeekFlag,QuarterFlag))

as per selection on filterfreq field it check this condition and give appropriate flag fields.

Not applicable
Author

Hi Vijay,

Thanks for reply. I tried the same, it was showing some discrepancy like below

SSSSSSSSSSS.JPG

when i select Quarter > It shows like Q4-FY2015...

Wee k > 10/16/2015....

Sub2u444