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

Alternate states syntax

Hi,

Could someone explain me the following syntax from the examples in getting started QV11?

num(Sum({[Group 1]<[Product Sub Group]=, Path = $::Path, Region = $::Region, Year = $::Year, Quarter = $::Quarter, Month = $::Month>} Sales)/1000, '#,##0')


and the corresponding one for the alternate state is

num(Sum({[Group 2]<[Product Sub Group]=, Path = $::Path, Region = $::Region, Year = $::Year, Quarter = $::Quarter, Month = $::Month>} Sales)/1000, '#,##0')

1 Solution

Accepted Solutions
CELAMBARASAN
Partner - Champion
Partner - Champion

Hi,

     Use these expressions as expression in bar chart.

Celambarasan

View solution in original post

10 Replies
CELAMBARASAN
Partner - Champion
Partner - Champion

Hi,

     From the below expression

     num(Sum({[Group 1]<[Product Sub Group]=, Path = $::Path, Region = $::Region, Year = $::Year, Quarter = $::Quarter, Month = $::Month>} Sales)/1000, '#,##0')

in this part {[Group 1]<[Product Sub Group]=

     Group 1 is alternate state it calculates based on the field selection in that states.

Path = $::Path

from this

$ means default state where you can change it to [Group 2] which is another state.

$::Path which synchronizes selection with the specified alternate field(here it is default state for the field Path).Its simply like assigns the Default state selection of the field Path to the Path of the Group 1 alternate state.

Celambarasan

Not applicable
Author

Thanks,

I have additionnal questions though: for the expressions [product Sub Group], it seems to be a drill down group, however, when creating the list boxes of each groups (alternative states), it is not possible to build a definition with a drill down group...should I just write it down?

Not applicable
Author

Moreover I can't manage to link the 2 list boxes corresponding to each groups from the 2 alternatives states to the bar chart representing the comparison.

-Here is the expressions of each of my list box groups:

Group1:
num(Sum({[Group 1]<[Energy Consumer sub group]=, Country = $::Country, Years = $::Years,>}Quantity)/1000,'#,##0')

Group 2:
num(Sum({[Group 1]<[Energy Consumer sub group]=, Country = $::Country, Years = $::Years,>}Quantity)/1000,'#,##0')

-And the expressions of my bar chart supposed to compare both groups:

Group1
sum({[Group 1]<Country = $::Country, [Energy Consumer Type]= $::[Energy Consumer Type], Year = $::Year>} Quantity)

Group2

sum({[Group 1]<Country = $::Country, [Energy Consumer Type]= $::[Energy Consumer Type], Year = $::Year>} Quantity)


Do you see any wrong formulation?

Not applicable
Author

quantity being related to Energy consumer type

CELAMBARASAN
Partner - Champion
Partner - Champion

Hi,

     Can you explain what you trying to do exactly?

    

Celambarasan

CELAMBARASAN
Partner - Champion
Partner - Champion

Hi,

     Are you looking for the way to compare two alternate states?if so then your expressions should be

     Group1:

     sum({[Group 1]} Quantity)

     Group2:

     sum({[Group 2]} Quantity)

Celambarasan

Not applicable
Author

Yes thanks ! that's it, but how do you plot this comparison made in a bar chart such as in the example?

CELAMBARASAN
Partner - Champion
Partner - Champion

Hi,

     Use these expressions as expression in bar chart.

Celambarasan

Not applicable
Author

Indeed!
Simple as it is

Many thanks