Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
hello..
i've a problem with set analyst that doesn't show any data
first when i do with a daily date dimension and expression with set analyst below it able to show data
Sum ({<mst_date={"<=$(=(RowNo))>$(=RowNo((RowNo)-6))"}>} (value/time))
but when i do with a group of day dimension and expression with set analyst below, it unable to show data
Sum ({<mst_date={"<=$(=(RowNo))>$(=RowNo((RowNo)-6))"}>} max(value/time))
why is it happen?
how to make set analyst with function inside it?
many thx...
Well you can't have nested aggregation sum(max()) and that is why no data is shown. You also can't insert the max function into set analysis. Although that might appear to work, it would actually be evaluated globally rather than over your dimensions and would give you the max for the entire data set. For something like this you need to use AGGR:
sum({set goes here}
aggr(
max(value/time),
[your dimension(s) here]
)
)
Regards,
Well you can't have nested aggregation sum(max()) and that is why no data is shown. You also can't insert the max function into set analysis. Although that might appear to work, it would actually be evaluated globally rather than over your dimensions and would give you the max for the entire data set. For something like this you need to use AGGR:
sum({set goes here}
aggr(
max(value/time),
[your dimension(s) here]
)
)
Regards,
hello Vlad
it worked
now it shows datas
but the set analyst isn't working well
it doesn't show as the set analyst condition
when i click on a specific of date, it only show on-click date
not the latest date till on-click date
why is it happen?
i've attached the file also
many thx..
[View:http://community.qlik.com/cfs-file.ashx/__key/CommunityServer.Discussions.Components.Files/11/0407.group-test.rar:550:0]
btw my set analyst now for this condition is :
Sum ({<year=,month=,date=,RowNo_sci={"<=$(=(RowNo_sci))>$(=RowNo_sci((RowNo_sci)-6))"}>}
aggr(
(max(curr_ihsg_high)-max(curr_ihsg_low)),DayGroupThree
)
)
it's kinda advance for me, since i'm a newbie with QlikView
many thx..
anyone?
no body?
is there any thread with the same problem that solved?
please give me a clue...
It looks like you are ignoring the date selection in your Sum function, but not in your Max. Your Max function is only evaluating for the current selections. You probably want to include all of your Set Analysis from your Sum in your Max.
To just ignore date:
Sum ({<year=,month=,date=,RowNo_sci={"<=$(=(RowNo_sci))>$(=RowNo_sci((RowNo_sci)-6))"}>}
aggr(
(max({<date=>}curr_ihsg_high)-max({<date=>}curr_ihsg_low)),DayGroupThree
)
)You probably want:
Sum ({<year=,month=,date=,RowNo_sci={"<=$(=(RowNo_sci))>$(=RowNo_sci((RowNo_sci)-6))"}>}
aggr(
(max({<year=,month=,date=,RowNo_sci={"<=$(=(RowNo_sci))>$(=RowNo_sci((RowNo_sci)-6))"}>}
curr_ihsg_high)-
max({<year=,month=,date=,RowNo_sci={"<=$(=(RowNo_sci))>$(=RowNo_sci((RowNo_sci)-6))"}>}
curr_ihsg_low)),
DayGroupThree
)
)You're right that the inner expressions need set analysis. In fact, I don't think the outer sum needs a set (unless there is a different set that must be applied globally).
Yes, you are right. If the Set Expressions are on the Maxes, then they should not be needed on the Sum.