Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

kainabaptista
New 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
Valued Contributor

Re: Filtering Data

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
New Contributor II

Re: Filtering Data

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
Contributor III

Re: Filtering Data

For Fase 1:

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

kainabaptista
New Contributor II

Re: Filtering Data

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

dwforest
Valued Contributor

Re: Filtering Data

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
New Contributor II

Re: Filtering Data

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
Valued Contributor

Re: Filtering Data

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.

Community Browser