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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
risabhroy_03
Partner - Creator II
Partner - Creator II

Measure issue

I am using the below in a measure called Quantity

if([Table Source]=('WHINH301') and ([T$LTRL]=1) and ((trim("T$BOLA"))<>''),Sum({<[Ship_Date_GMT_Updated]={"<=$(vLastmonthdate)"},[Arrive_Date_GMT_Updated]={">$(vLastmonthdate)"}>} Quantity)
,if([Table Source]=('WHINH301') and ([T$LTRL]=2) and ((trim("T$BOLA"))<>''),Sum({<[Ship_Date_GMT_Updated]={"<=$(vLastmonthdate)"}>} Quantity)))

It works perfectly fine on my table.
But the moment I remove [T$LTRL] & [T$BOLA] field from my table (Front end) the value changes.

I mean the above expression only works when I add  [T$LTRL] & [T$BOLA] dimension on my front end table.

But I want to work this without adding it to my table.

1 Reply
AshutoshBhumkar
Partner - Specialist
Partner - Specialist

Hello,

How about creating a flag in script for trim("T$BOLA"))

Like, If(Len(trim("T$BOLA"))  = 0,1,0) as Flag.

You are checking T$LTRL for 1 or 2, when you remove that column from table there is nothing to check in that table. Better go with flags in the script.

It would be difficult to understand the exact issue if we don't have any sample data ? Could you provide any ?

 

Thanks,
Ashutosh