Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
LOAD * INLINE [
date, Value
1, 20
1, 30
2, 10
2, 15
3, 40
3, 11
];
This question is part of a more complex expression but here is a simplified version of where it fails:
sum(if(date = max(date), value) => null
is there some other way to accomplish the same?
LOAD * INLINE [
date, Value
1, 20
1, 30
2, 10
2, 15
3, 40
3, 11
]
WHERE sum(if(date = max(date), value) >=Null();
the expression is used in the app not when loading data. here is just some example data, its just something to test an expression on.
It may be a typo, but there is one parenthesis missed there
sum(if(date = max(date), Value))
Besides, names are case sensitive in QlikView. I'd rather try
sum({< date = {'$(=max(date))'} >} Value)Hope this helps
I realise My explanation was quite bad.
The expression resides in a chart and has to calculate separatly for each row due to a third field which i did not include here, So there can be No set analysis since they calculate once for the entire chart. so is there any way to write the expression in ifs? (with correct case of course)
If you only want to get the maximumd date, then something like this should work
If(date=max(TOTAL date), Sum(Value))
Hope that helps.