Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Set analysis for max date value?

There is month name and week name for each date. when i select month i need the value for max date.

Ex- For August i need the value for max date(i.e 31st August)  as in database

Thanks in advance,

Soumya

1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

to clarify: you have data from different months. you Need fromeach month the value frommax(date) withinthat month?

then aggr function might be helpful (i am not sure if Syntax is correct)

aggr(sum({$<my_date={"$(=max(my_date))"}>}Metric),my_date)

View solution in original post

24 Replies
Not applicable
Author

We have 4 columns

Month,Week , Date  and some metric

i tried this way

=Sum({<Date = {"$(max(date))"}>}listing_count)

But its not working

Can anyone help me out of this?

Anonymous
Not applicable
Author

one is Date, other is date

next "=" is missing

Date is an inbuilt function, rename your fieldnames myDate instead of Date

wrong: =Sum({<Date = {"$(max(date))"}>}listing_count)

try = sum({<myDate={"=$(=max(myDate))"}listing_Count)

settu_periasamy
Master III
Master III

Hi,

Field value is case sensitive. check your field date or Date

You can try

=Sum({<Date = {'$(=max(Date))'}>}listing_count)

jonathandienst
Partner - Champion III
Partner - Champion III

Firstly - QV field names are case sensitve, so the fields date and Date are two distinct fields, which I assume is not your intention. Assuming the field name is "date" and that "date" is a proper QV date value and is formatted in your default date format:


=Sum({<date = {"$(=Date(max(date)))"}>} listing_count)

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
Not applicable
Author

Actually its Date only

Type  mistake

settu_periasamy
Master III
Master III

May be you can try with date format..

like

=Sum({<Date = {'$(=Date(max(Date)))'}>}listing_count)

or

=Sum({<Date = {'$(=Date(max(Date)),YourDateFieldFormat)'}>}listing_count)

Not applicable
Author

sum({<myDate={"=$(=max(myDate))"}listing_Count)


This code is working but if i do the selection then it shows only the max date i.e august


I want Number for all the months


Thanks,

Soumya

Not applicable
Author

sum({<myDate={"=$(=max(myDate))"}listing_Count)


This code is working but if i do the selection then it shows only the max date i.e august


I want Number for all the months


Thanks,

Soumya

Anonymous
Not applicable
Author

I donot understand with your origin Statement that you Need max date?

does that mean if I select August you want complet August, if I select Jun-Aug

you want data from 1.6.-31.8?

you would not Need set Analysis as you select the months you require

sum(listing_Count)

if you Need complet range you may use this

sum({<myDate={">=$(=min(myDate))<=$(=max(myDate))"}listing_Count)