Qlik Community

Ask a Question

New to Qlik Sense

If you’re new to Qlik Sense, start with this Discussion Board and get up-to-speed quickly.

Announcements
Our next Qlik Insider session will cover new key capabilities. Join us August 11th REGISTER TODAY
cancel
Showing results for 
Search instead for 
Did you mean: 
kainabaptista
Contributor II
Contributor II

Filtering Data

I've got a data base with products separated by ID, Status and Date. I'd like to create a function to count all the differents Id's that has the same status, although, as we use a accumulative Data, the older status of a same ID gets accumulated in the count of the provious

                            Data Example

ID               |            STATUS         |           DATA_HOJE

1                               Fase 1                27/03/2018 11:43:04            

2                               Fase 1                27/03/2018 12:47:04 

3                               Fase 1                27/03/2018 13:43:05 

1                               Fase 2                27/03/2018 11:43:04 

1                               Fase 3                27/03/2018  11:43:04      

2                               Fase 2                27/03/2018 11:43:04 

                                      .

                                      .

                                      .

               Any Suggestions?

7 Replies
dwforest
Specialist II
Specialist II

So count of status by Month? Not sure what you mean by older status getting accumulated; a sample of your output would help.

If you add a Master Calender, you would have the Month of each date.

Then it is simply Count(ID) on a chart/table with STATUS and Month dimensions

kainabaptista
Contributor II
Contributor II
Author

Hey David,

Actually, i need the updated count of Status per ID. In this Example i would like to have 3 KPI's with:

Fase 1 - 1

Fase 2 - 1

Fase 3 - 1

I meant if i counted all the Status "Fase 1" as Example i would have 3 ID's, but actually i have just 1 processes there.

kaanerisen
Creator III
Creator III

For Fase 1:

Count({<STATUS={'Fase 1'}>} distinct ID)

kainabaptista
Contributor II
Contributor II
Author

With this Fx it always gives me back the number 1, dont know why...

dwforest
Specialist II
Specialist II

Then something is out of sync with your actual data and the same data. Note that this set expression does not ignore an other selections, to do that add 1 in front {1<STATUS={'Fase 1'}>}

Fase.PNG

kainabaptista
Contributor II
Contributor II
Author

Man, your KPI is wrong for what've asked. You're not using the date. I need the count of the latest ID's of each STATUS, got it?

dwforest
Specialist II
Specialist II

Not a good idea to insult those trying to help you...

I provided a count of IDs by status as I understood your ask. If that is not what you want, articulate with more information including expected results.

I think I 'Got it', for the sake of others who may need this; this is the count of IDs based on the last Fase (Phase) they were in (data altered from original to get ensure it works rather than getting 1 for each.

Fase.PNG

This information brought to you free of charge in hopes that it is payed forward.