Skip to main content
Announcements
Introducing a new Enhanced File Management feature in Qlik Cloud! GET THE DETAILS!
cancel
Showing results for 
Search instead for 
Did you mean: 
tulasiram_bitra
Creator
Creator

How to Consider Maximum Date in Each Month as Dimension ?

Hi Frnz,

I would like to show monthly wise  count({$<Aging_Category={'0-30'}>}Aging_Category).

but here i have to consider maximum date in each month. i.e.,

Jan - 31st [ Depends on my data ]

Feb - 28th

------

Please help me to write expression for that.

Here Dimension  ==> Month

        Expression  ==> count({$<Aging_Category={'0-30'}>}Aging_Category)

1 Solution

Accepted Solutions
sunny_talwar

Do you want this?

Capture.PNG

Expressions:

FirstSortedValue(Aggr(Count({$<Aging_Category={'0-30'}>}Aging_Category), Month, Date), -Aggr(Date, Month, Date))

FirstSortedValue(Aggr(Count({$<Aging_Category={'31-60'}>}Aging_Category), Month, Date), -Aggr(Date, Month, Date))

FirstSortedValue(Aggr(Count({$<Aging_Category={'61-90'}>}Aging_Category), Month, Date), -Aggr(Date, Month, Date))

View solution in original post

22 Replies
sunny_talwar

Haven't tested it, but may be this:

FirstSortedValue({$<Aging_Category={'0-30'}>} Aggr(Count({$<Aging_Category={'0-30'}>}Aging_Category), Month), -Date)

tulasiram_bitra
Creator
Creator
Author

Hi Sunny,

Thanks for your reply.

It is not working. I have to consider maximum date of Month.

And I have to show January to December.

tulasiram_bitra
Creator
Creator
Author

Hi,

I need to show like in this image.

But here every month has to be one value (Maximum).

sunny_talwar

Do you have a sample you can share?

MK_QSL
MVP
MVP

May be

Count({<{$<Aging_Category={'0-30'}>}>}Aggr(IF(Date = Date(Max(TOTAL <Month> {<{$<Aging_Category={'0-30'}>}>}Date)), Aging_Category),Month,Date))

tulasiram_bitra
Creator
Creator
Author

Hi,

It is giving error in expression. Can you please check once.

MK_QSL
MVP
MVP

What is the field name in your application?

are they exactly same?

Date, Month and Aging_Category?

tulasiram_bitra
Creator
Creator
Author

Hi Manish,

Sorry for late reply. I have same filed names. Something syntax wrong. I didn't get. Please find the image.

Anonymous
Not applicable

Why not do this at script and then use it at UI?

At script like this?

Load *,

max(Date) as Date

from tablename

group by month(Date);