Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Join this live chat April 6, 10AM EST - QlikView to Qlik Sense REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Set analysis with if (Bucketing)

Hi,

I am creating a chart with calculated dimension and using the following formula. I have a field "RuleNo" Which have values i.e 1,2,3...

I want to filter for RuleNo 1 and create bucket.

=({<RuleNo={1}>} if(C_DIFFDAYS_PO_VS_PR_Date<0, 'PR Date < PO Date', if(C_DIFFDAYS_PO_VS_PR_Date>0,'PR Date > PO Date','PR Date = PO Date')))

It's not working. How can I achieve this?

1 Reply
sunny_talwar

Leave your calculated dimension as is, but apply set analysis to the expression

=if(C_DIFFDAYS_PO_VS_PR_Date<0, 'PR Date < PO Date',

if(C_DIFFDAYS_PO_VS_PR_Date>0,'PR Date > PO Date','PR Date = PO Date')))

Sum({<RuleNo={1}>}Measure)

Or use if statement

=If(RuleNo = 1,

     if(C_DIFFDAYS_PO_VS_PR_Date<0, 'PR Date < PO Date',

     if(C_DIFFDAYS_PO_VS_PR_Date>0,'PR Date > PO Date','PR Date = PO Date'))))