Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to Restrict the values in Straight Table

Hi All,

I have a Straight table having 7 KPI's. The 7th KPI is derived based on the first  6KPI's.

The o/p of 7th KPI is 'Flag'  and Spaces.I want to show only 'Flag ' value in the 7th KPI and ignore the spaces.

Logic for 7th KPI Email Flag Condition:

if([CP Budget]=0,'',

if([ResidentDays Budget]=0,'',

if([Meals Budget]=0,'',if([CP Actual]>=[CP Budget]*1.15,'Flag',

if([CP Actual]<=[CP Budget]*0.85,'Flag',

if([ResidentDays Actual]>=[ResidentDays Budget]*1.15,'Flag',

if([ResidentDays Actual]<=[ResidentDays Budget]*0.85,'Flag',

if([Meals Actual]>=[Meals Budget]*1.15,'Flag',

if([Meals Actual]<=[Meals Budget]*0.85,'Flag','')))))))))

Actuall.JPG

Can any one help on this.

Thanks,

Krishna

1 Solution

Accepted Solutions
rahulpawarb
Specialist III
Specialist III

Hello Krishna,

Hope you are keeping well!

As a workaround, you can replace the blank spaces by Null() in the script and create a list box with same expression. Post this make a selection on list box and lock the selection. You can also hide the list box.

Sample modified expression:

if([CP Budget]=0,

   Null(),

   if([ResidentDays Budget]=0,

      Null(),

   if([Meals Budget]=0,

      Null(),

  if([CP Actual]>=[CP Budget]*1.15,

     'Flag',

  if([CP Actual]<=[CP Budget]*0.85,

    'Flag',

    if([ResidentDays Actual]>=[ResidentDays Budget]*1.15,

       'Flag',

       if([ResidentDays Actual]<=[ResidentDays Budget]*0.85,

          'Flag',

          if([Meals Actual]>=[Meals Budget]*1.15,

             'Flag',

             if([Meals Actual]<=[Meals Budget]*0.85,

    'Flag',

    Null()

    )

  )

  )

   )

    )

     )

     )

    )

  )

Hope this will be helpful.

Regards!

Rahul

View solution in original post

4 Replies
Anil_Babu_Samineni

This condition is not working for you?

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
rahulpawarb
Specialist III
Specialist III

Hello Krishna,

Hope you are keeping well!

As a workaround, you can replace the blank spaces by Null() in the script and create a list box with same expression. Post this make a selection on list box and lock the selection. You can also hide the list box.

Sample modified expression:

if([CP Budget]=0,

   Null(),

   if([ResidentDays Budget]=0,

      Null(),

   if([Meals Budget]=0,

      Null(),

  if([CP Actual]>=[CP Budget]*1.15,

     'Flag',

  if([CP Actual]<=[CP Budget]*0.85,

    'Flag',

    if([ResidentDays Actual]>=[ResidentDays Budget]*1.15,

       'Flag',

       if([ResidentDays Actual]<=[ResidentDays Budget]*0.85,

          'Flag',

          if([Meals Actual]>=[Meals Budget]*1.15,

             'Flag',

             if([Meals Actual]<=[Meals Budget]*0.85,

    'Flag',

    Null()

    )

  )

  )

   )

    )

     )

     )

    )

  )

Hope this will be helpful.

Regards!

Rahul

Not applicable
Author

Thanks,

By using list box  it is working.

rahulpawarb
Specialist III
Specialist III

Cheers,

Rahul