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

Adding AND Function

Hello,

hope someone can help me with my problem.

First of all i wanted to count all my tasks which are longer in process then the desired duedate.

I created this code and it worked

=((Count(if(duedate<= Today(),duedate)))) - (Count({<[Status (gen)]={'done'}>}[Status (gen)]))

So it counts all tasks with an duedate shorter then the actual date, excluding all tasks that are already done.

[Status (gen)] can be "done" or "in progress"

Now i want to add an AND Function:

For example: AND [Category] = {' Supply Chain'}

i tried to add my AND but the code did not work

11 Replies
simenkg
Specialist
Specialist

You can join the Category into the fact table and then do the load.

Tasks_t1:
Load * from Tasks.qvd (qvd);

Categories:
Load * from Categories.qvd (qvd);

Left join (Tasks_t1)

Load %Task_Key, Category as TestCategory resident Categories;

noconcatenate

Tasks:

Load *,

if(duedate<= Today() and [Status (gen)] <> 'done' and [TestCategory] = 'Supply Chain', 1, 0) as OverdueFlag

resident Tasks_t1;


Drop table Tasks_t1;

Drop field TestCategory;

Not applicable
Author

Thank you!