Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
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)

22 Replies
tulasiram_bitra
Creator
Creator
Author

Hi,

I have attached qvw. Please find this.

I have used this formulae : count({$<Aging_Category={'0-30'},Date={'$(=max(Date))'}>}Aging_Category).

This is working, but here it is showing only one month in dimension.

Can you please suggest, how to show all months in dimension.

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))

jagan
Partner - Champion III
Partner - Champion III

Hi,

In that case try like this

Data:

LOAD

*,

MonthName(DateFieldName) AS MonthName,

FROM DataSource;

LEFT JOIN(Data)

LOAD

MonthName,

Max(DateFieldName) AS DateFieldName,

1 AS MaxDateInMonthFlag

Resident Data

Group By MonthName;

Now in your expression just use

Dimension = Month

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

Hope this helps you.

Regards,

jagan.