Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
amit_saini
Master III
Master III

Script Help???

Hi Folks ,

Below is my expression :

Sum({<Complaint_Acceptance-={'4','5','6','7'}>} QTY_PPM*Top_Pos_Flag)/if(Complaint_Type=3 or Complaint_Type=1, Sum (QTY_Delivered_TOTAL),if(Complaint_Type=2 or Complaint_Type=7, Sum (QTY_Received_TOTAL), 0))

*1000000

I'm calling a bar chart with Month as Dimension , but I'm getting "no data displayed value" when I'm calling above expression.

Not sure If my expression is correct or not?

Kindly suggest!

Thanks

AS

13 Replies
PrashantSangle

Hi,

did you check that there is value for complaint type 1,3,2,7

also if it none of the above then you want to divide it by 0 or 1.

If possible share your sample app.

Regards

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
jonathandienst
Partner - Champion III
Partner - Champion III

Break it down into parts. But I expect the problem is due to the fact that you have more than one possible value of Complaint_Type for each row.

So check that

=Sum({<Complaint_Acceptance-={'4','5','6','7'}>} QTY_PPM*Top_Pos_Flag)

works correctly. Then check the divisor

=if(Complaint_Type=3 or Complaint_Type=1, Sum (QTY_Delivered_TOTAL),if(Complaint_Type=2 or Complaint_Type=7, Sum (QTY_Received_TOTAL), 0))

I dont think this is working.

As an alternative (to remove the naked references to Complaint_Type)

Sum({<Complaint_Acceptance-={4,5,6,7}>} QTY_PPM*Top_Pos_Flag) /

(Sum ({<Complaint_Type = {1, 3}>} QTY_Delivered_TOTAL) + Sum ({<Complaint_Type = {2, 7}>} QTY_Received_TOTAL)) *1000000

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
Kushal_Chawda

try this

=(Sum({<Complaint_Acceptance-={'4','5','6','7'}>} QTY_PPM*Top_Pos_Flag)/

Sum ({<Complaint_Type={'1','3'}>}QTY_Delivered_TOTAL) + Sum ({<Complaint_Type={'2','7'}>}QTY_Received_TOTAL))*1000000

amit_saini
Master III
Master III
Author

Max,

Here is the attachment.

Thanks,

AS