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: 
Anonymous
Not applicable

Set analysis - constant values regardless of the filters

Good Morning,

I am trying to create a KPI that shows the number of orders in arrears, according to the intervals that I defined:

1 day late

2 to 3 days late

4 to 6 days late

7 to 15 days late

+16 days late

In addition to the number of days in arrears, I need to consider two other constraints: vMissingUnit <0 and OrdStatus = confirm.

I want to show the number of overdue orders for each of the ranges in different views and so I need to write 5 expressions.

I started with some like this but it is not working:

1 day late -

Count({1<vNoDaysLate={"1"}, vNoMissingUnits={"<=1"}, OrdStat={"CONFIRM"}>}ItemOrd)

2 to 3 days late -

Count({1<vNoDaysLate={"2,3"}, vNoMissingUnits={"<=1"}, OrdStat={"CONFIRM"}>}ItemOrd)

I want these values to be constant regardless of the filters in use in my app.

Can someone help me, please? Thank you!

8 Replies
sunny_talwar

What is vNoMissingUnits? Is this a field or variable?

Anonymous
Not applicable
Author

It's a variable!

sunny_talwar

What is the expression or field behind it? If it is a field... then it might still work... but you cannot have function on the left hand side of a set modifier

Anonymous
Not applicable
Author

Its a function... vNoMissingUnit = FinUnits - OrdUnits, where FinUnits and OrdUnits are fields... vNoDaysLate is also a function. Can't I have variables like this two on the left side of a set modifier? Thank You!

sunny_talwar

Nope, this is not allowed... what are you trying to do? May be there is an alternative?

sunny_talwar

May be this

Count({1<ItemOrd = {"=Match(vNoDaysLate, 2, 3) and vNoMissingUnits <= 1 and OrdStat = 'CONFIRM' "}>}ItemOrd)

Anonymous
Not applicable
Author

Thank you!

This expression doesn't work because it doesn't recognize vNoDaysLate and vNoMissingUnits as variables.

I am trying to create a KPI that shows the number of orders in arrears, according to the intervals that I defined:

1 day late

2 to 3 days late

4 to 6 days late

7 to 15 days late

+16 days late


The problem is that us intervals aren't a field so I don't know how to do it

sunny_talwar

Would you be able to share a sample?