Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Join this live chat April 6, 10AM EST - QlikView to Qlik Sense REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
lessassy
Creator
Creator

Max Month per Quarter in set analysis if sum(value) not null

Hello everyone,

QUARTER TRI.PNG

I have these datas

I would like to display the sum of value when taking into account the max month of a quarter when there is a value.

Basically for each quarter i would like the max month when value is not null

Basically it would be something like that :

if (Quarter = 'Q1' ,SUM({<CAT_CONTRAT = {'CDI'}, Annee = {'$(=max(Year)-1)'} ,
Month = {'???????????'}>}Value),

if (Quarter = 'Q2',SUM({<CAT_CONTRAT = {'CDI'}, {'$(=max(Year)-1)'} ,
Month = {'???????????'}>}Value),

if (Quarter = 'Q3' ,SUM({<CAT_CONTRAT = {'CDI'}, {'$(=max(Year)-1)'} ,
Month = {'???????????'}>}Value),

if (Quarter = 'Q4' ,SUM({<CAT_CONTRAT = {'CDI'}, Annee = {'$(=max(Year)-1)'} ,
Month = {'???????????'}>}Value),))))

Thank you

 

 

 

 

Labels (3)
1 Solution

Accepted Solutions
vamsee
Specialist
Specialist

May be try something like

for Value

Only(Aggr(Max({<Value={">0"},CAT_CONTRAT={'CDI'}>}Value),Quarter, Year))

 

For Month Name

Month(Date#(Aggr(Max({<Value={">0"},CAT_CONTRAT={'CDI'}>}Month),Quarter, Year)
, 'M'))

 

vamsee_0-1593103143916.png

 

If this doesn't work let us know the dimensions you are using or expected output.

View solution in original post

3 Replies
vamsee
Specialist
Specialist

May be try something like

for Value

Only(Aggr(Max({<Value={">0"},CAT_CONTRAT={'CDI'}>}Value),Quarter, Year))

 

For Month Name

Month(Date#(Aggr(Max({<Value={">0"},CAT_CONTRAT={'CDI'}>}Month),Quarter, Year)
, 'M'))

 

vamsee_0-1593103143916.png

 

If this doesn't work let us know the dimensions you are using or expected output.

View solution in original post

lessassy
Creator
Creator
Author

Hello,

 

It worked well thank you !

 

vamsee
Specialist
Specialist

Glad could be of help.

---------------------------------------

To help users find verified answers, please do not forget to use the "Accept as Solution" button on any post(s) that helped you resolve your problem or question.