Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Announcements
Leverage your QlikView investment to modernize BI – see how! Join Group
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Creator
Creator

Bug in set analysis?

Hi All,

I have this data set:

 

ScenarioVersionProductAmount
Actual1A10
Actual2A9
AG1A12
AG2A11
AG3A13
FC1A9
FC2A10

In a straight table, product as dimension and expression as Sum({$<Product=,Scenario={'Actual'},Version={"$(=Max(Version))"}>} Amount), it's giving no result. If I select in Scenario Actual of FC, it's giving correct result that is 9. But if i select Scenario as AG, it's not giving any result again. Something to do with possible max version when selection is made. When nothing is selected, it's taking max(version)=3, and there is no actual for 3.

Please advise.

Thanks

SAK

1 Solution

Accepted Solutions
Highlighted
MVP
MVP

Re: Bug in set analysis?

The dollar sign expansion of $(=Max(Version)) will be performed before the actual expression will be evaluated, hence only once per chart and not considering the dimension. It's only considering user selection state.


If you need the max version per dimensional value, you can for example use FirstsortedValue:


FirstSortedValue( {$<Product=,Scenario={'Actual'} >} Amount, -Version)


Or if you want to find the max version of Scenario Actual, you can use a set expression within the dollar sign expansion;


Sum({$<Product=,Scenario={'Actual'},Version={"$(=Max({<Scenario = {'Actual'}>} Version))"}>} Amount)

View solution in original post

2 Replies
Highlighted
MVP & Luminary
MVP & Luminary

Re: Bug in set analysis?

Hi,

It is not the issue with Set analysis. It is with what you want.

If you can explain what you want probably that will help us to suggest you solution.

Regards,

Kaushik Solanki

Regards,
Kaushik
If reply is satisfactory, please "Like" the post.
If reply is solution, please mark as "Correct".
Highlighted
MVP
MVP

Re: Bug in set analysis?

The dollar sign expansion of $(=Max(Version)) will be performed before the actual expression will be evaluated, hence only once per chart and not considering the dimension. It's only considering user selection state.


If you need the max version per dimensional value, you can for example use FirstsortedValue:


FirstSortedValue( {$<Product=,Scenario={'Actual'} >} Amount, -Version)


Or if you want to find the max version of Scenario Actual, you can use a set expression within the dollar sign expansion;


Sum({$<Product=,Scenario={'Actual'},Version={"$(=Max({<Scenario = {'Actual'}>} Version))"}>} Amount)

View solution in original post