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
kkkumar82
Specialist III
Specialist III

If Iam correct your default value is Quarter otherwise,

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

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

this would be fine

Kiran Kumar

Chanty4u
MVP
MVP

correction.

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

tamilarasu
Champion
Champion

Hi,

Try,

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

If nothing selected then QuarterFlag will be displayed by default.

Not applicable
Author

Hi,

Its not working, If allow only 2 values after checking the condition.

Its not accepting 3rd value.

Sub2u444

kkkumar82
Specialist III
Specialist III

Hi,

Can you be clear on what you want, upload some sample data and explain your requirement better.

HirisH_V7
Master
Master

Hi,

You can use set analysis , Are you using this in chart?

else

you can modify your expression like this,

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


HTH,

Hirish



HirisH
“Aspire to Inspire before we Expire!”
Not applicable
Author

Hi Kiran,

It was not working. Instead of WeekFlag it shows 'Weekly'..

SUb2u444

kkkumar82
Specialist III
Specialist III

I think the if condition must be changed

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


Do you have WeekFlag field then it should work.


Otherwise check the values in FilterFreq column , then change the condition accordingly.


Thanks

Kiran Kumar



Not applicable
Author

Hi Hirish,

Yes, i am using in Bar Chart.

Bar Chart Expr:- If(GetSelectedCount(QuarterFlag)>0,MonthFlag,WeekFlag)

Filter Expr:-

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

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

when i select in Week in Filter - Bar Chart shows Monthly Data.

Sub2u444