Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Question about dates on graph

hi everyone,

I've a db with the number of employees divided per month

dates are stored with the format MM-YY


i would like to sum in one graph the total of employees belonging to the last updated month.

the title of the page is : Date(Max([DB Headcount.Validity Date]), 'MM-YY') and it shows me correctly "12-17"


If i use the function


Sum({$<[DB Headcount.Validity Date]={"12-17"}>}[DB Headcount.HC])

the graph works correctly

but the following function within the same graph doesn't work:

Sum({$<[DB Headcount.Validity Date]={"Date(Max([DB Headcount.Validity Date],'MM-YY'))"}>}[DB Headcount.HC])

any clue?

thanks

paolo

3 Replies
zebhashmi
Specialist
Specialist

Try that

Sum({$<[DB Headcount.Validity Date]={"$(Date(Max([DB Headcount.Validity Date],'MM-YY')))"}>}[DB Headcount.HC])

Or may be this

Sum({$<[DB Headcount.Validity Date]={"=$(Date(Max([DB Headcount.Validity Date],'MM-YY')))"}>}[DB Headcount.HC])

Anonymous
Not applicable
Author

not working.. shows just o value

OmarBenSalem

Sum({$<[DB Headcount.Validity Date]={"$(=Date(Max([DB Headcount.Validity Date],'MM-YY')))"}>}[DB Headcount.HC])


u are missing the $(=urExpression) :

when u use a set analysis to force a condition:

1)if it's numeric: u write directly: Year={2013}

2)if it's a string: btwn quotes: Country={'Tunisia'}

3)if it's a function , u surround ur function with $() and double quotes: Year={"$(=max(Year))"}

4)if u're using a comparison function , u put = and double quotes: Year={"=sum(Sales)>5000"}


hope this helps