Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
bhargavikn
Contributor III
Contributor III

Considering Max value based on Period

Hi,

we have below table have Value for currency for different periods. 

Month Quarter Currency Value
Sep-22 Q3 USD 12
Sep-22 Q3 USD 13
Oct-22 Q3 USD 14
Oct-22 Q3 USD 15
Nov-22 Q3 USD 16
Nov-22 Q3 USD 17
Dec-22 Q4 USD 12
Dec-22 Q4 USD 14
Jan-23 Q4 USD 18
Jan-23 Q4 USD 20
Feb-23 Q4 USD 14
Feb-23 Q4 USD 15

 

Need to show the max value if we are working Month wise, and also if we are showing the data for Quarter wise it should show max value for Quarter.

Can you please suggest me on this.

Thank you.

Labels (1)
1 Solution

Accepted Solutions
bhargavikn
Contributor III
Contributor III
Author

Thank you all for your reply.

I have tried with below kind of script  and it working.

T1:

Load 

Max(Month) as Month, Quarter, Currency

Group by

Quarter, Currency ;

Left Join(T1)

Load Currency, Quarter, Value;

 

View solution in original post

4 Replies
Or
MVP
MVP

Seems like you should be using Max(Value) with a dimension of month or quarter as appropriate?

bhargavikn
Contributor III
Contributor III
Author

Hi, Thank you for reply.

Yes, I have used Max(value) using group by month, Quarter. 

with this approach it is showing max value only for Month,

but for Quarter it is showing max values of each 3 month values. 

I need to have only one max value for Quarter selection.

Please suggest me.

BrunPierre
Partner - Master
Partner - Master

=Only({$<Value= {"$(=Max(Value))"}>}Value)

bhargavikn
Contributor III
Contributor III
Author

Thank you all for your reply.

I have tried with below kind of script  and it working.

T1:

Load 

Max(Month) as Month, Quarter, Currency

Group by

Quarter, Currency ;

Left Join(T1)

Load Currency, Quarter, Value;