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

Minimum with aggr

Using a formula

SUM(

Aggr(COUNT({$<id_monitoring={'4_1'}>}DISTINCT Timestamp_of_filling), id_period,id_target,id_user,id_shop, Date)

     )

I get needed numbers how many times 4_1 was filled during each day, in each shop, by each user.

Using a formula

SUM(

     Rangemin(

        Rangemax(

            Aggr(COUNT({$<id_monitoring={'4_1'}>}DISTINCT Timestamp_of_filling), id_period,id_target,id_user,id_shop, Date)

            ,

            0)

        ,

        Rangemax(

            Aggr(COUNT({$<id_monitoring={'4_2'}>}DISTINCT Timestamp_of_filling), id_period,id_target,id_user,id_shop, Date)

            ,

            0)

        )

)

I get the minor number of filling 4_1 and 4_2.

But how can I get the minimum number of filling many monitorings: 4_1, 4_2, 4_3, ..... 4_n on each day, in each shop, by each user using more suitable formula?

2 Replies
swuehl
MVP
MVP

Maybe by using id_monitoring as an advanced aggregation (aggr() function) dimension?

Not applicable
Author

But if I put as en expression such a code:

MIN(Aggr(COUNT(DISTINCT Timestamp_of_filling),id_user,id_shop, Date, id_monitoring))

is Straight Table with Dimensions: id_period,id_target

I will get the smallest number of filling any monitoring during any day in the period.

This result is still not good. I need the minor number of filling any monitoring during each day in the period.

And next to sum up this the smallest numbers from each day - one number from each day in the period.

Thanks for response, but I still need help.