Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
claudio_reis_we
Partner - Contributor III
Partner - Contributor III

Calculate peak usage of the POS

Hello,

Can you help me please?

In Table 1, I calculated the maximum use of POS by store, date and period time.


In table 2, shows only the fact table.


I need to know which an expression that returns only the maximum use of the POS as shown in the table 3

Thanks!


Calc_Cencosud_2.png

9 Replies
vinieme12
Champion III
Champion III

Try as below, or provide a sample app or sample data

=Max(TOTAL <Store>  ExpressionforProductivity )

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
claudio_reis_we
Partner - Contributor III
Partner - Contributor III
Author

Hi, Vineeth,


the app is attached now.

vinieme12
Champion III
Champion III

Hi,

I'm not able to access my machine that has a licensed QV, can you telll me the fields used / Expressions you have in the table so I can recreate

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
claudio_reis_we
Partner - Contributor III
Partner - Contributor III
Author

Hi,


Table 1:

Dimensions

     Nro_Loja

     Qtd_Uso_PDV_FH

     Faixa_Horario

Expression

     Count(Aggr(if(Rank(Max(Qtd_Uso_PDV_FH),1)=1,1),Nro_Loja,Faixa_Horario))

Table 2: fact table

Dimensions

     Nro_Loja

     Qtd_Uso_PDV_FH

Expression

     Ticket = Sum(Tempo_Cupom)

     Availability = Sum(Tempo_Uso)

     Productivity = Ticket / Availability

Table 3, is just image. In this table that I need the expression

vinieme12
Champion III
Champion III

Try

Dimension:

Nro_Loja


Expressions:

1) Max(AGGR(MAX(Qtd_Uso_PDV_FH),Nro_Loja))


2) AGGR(if(Qtd_Uso_PDV_FH = MAX(AGGR(NODISTINCT MAX(Qtd_Uso_PDV_FH),Nro_Loja)), sum(Tempo_Cupom)),Nro_Loja,Qtd_Uso_PDV_FH)

3) AGGR(if(Qtd_Uso_PDV_FH = MAX(AGGR(NODISTINCT MAX(Qtd_Uso_PDV_FH),Nro_Loja)), sum(Tempo_Uso)),Nro_Loja,Qtd_Uso_PDV_FH)

4) Colum(2)/Colum(3)   

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
claudio_reis_we
Partner - Contributor III
Partner - Contributor III
Author

Hi,

It worked!!!

Thank you so much!

vinieme12
Champion III
Champion III

Hi claudio

Attaching something simpler

Dimensions:

Nro_Loja

calculatedDimension:

=aggr(if(Qtd_Uso_PDV_FH = Max(TOTAL <Nro_Loja> AGGR(MAX(Qtd_Uso_PDV_FH),Nro_Loja,Qtd_Uso_PDV_FH)) , Qtd_Uso_PDV_FH),Nro_Loja,Qtd_Uso_PDV_FH)

<<Check Suppress when value is null() for this dimension



Expressions:

sum(Tempo_Cupom)

sum(Tempo_Uso)

Column(1)/Column(2)



Also please close the thread by marking a response as correct

Qlik Community Tip: Marking Replies as Correct or Helpful




Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
claudio_reis_we
Partner - Contributor III
Partner - Contributor III
Author

Hi,

I have another situation, can you help me, please?

1. Create a bar chart that represents only the time bands where the amount of POS usage is greater than or equal to the value of the variable by calculating the average availability time.

2. Insert a line in the bar chart showing witch is the frequency in periods ranges the amount of POS in use are greater than or equal to the value of the variable.

Imagem_Community.png

Thanks in advance!

vinieme12
Champion III
Champion III

If you are still looking for an answer, use the below

=if(Count(Qtd_Uso_PDV_FH)>=$(vQty_POS),Count(Qtd_Uso_PDV_FH))

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.