Skip to main content
Announcements
Happy New Year! Cheers to another year of collaboration, connections and success.
cancel
Showing results for 
Search instead for 
Did you mean: 
manideep78
Partner - Specialist
Partner - Specialist

Alternate states in expression

Dear Community,

I want to put the below expression in alternate states like

Original Expression:

=RangeSum($(='Sum(['&GetFieldSelections(Item,']),Sum([', 999999)&'])'))

using Alternate states:

=RangeSum($(='Sum({AS_NoSel * $}['&GetFieldSelections(Item,']),Sum([', 999999)&'])'))


I tried the second expression, But not giving the exact result.

What's wrong in the 2nd expression?

Is there a way we can put that expression in alternate states?

Thanks in advance.

Regards

Manideep

1 Solution

Accepted Solutions
sunny_talwar

Can you check what do you get when you do

RangeSum(Sum({AS_NoSel * $}Ball), Sum({AS_NoSel * $}Pen))

Then try this:

=RangeSum($(='Sum({AS_NoSel * $}['&GetFieldSelections(Item,']),Sum({AS_NoSel * $}[', 999999)&'])'))

and select Ball and Pen from the item list box. Do you get a different number or a 0??

View solution in original post

31 Replies
sunny_talwar

What will be in the alternate state the Item listbox or the fields that are selected in the Item listbox are going to be in the alternate state?

sunny_talwar

May be this:

=RangeSum($(='Sum({AS_NoSel} * {$}['&GetFieldSelections(Item,']),Sum({AS_NoSel} * {$}[', 999999)&'])'))

manideep78
Partner - Specialist
Partner - Specialist
Author

Hi,

item list box

sunny_talwar

May be this:

=RangeSum($(='Sum(['&GetFieldSelections(Item,']),Sum([', 999999, 'AS_NoSel')&'])'))

The above will be driven by just the item listbox in AS_NoSel State.

manideep78
Partner - Specialist
Partner - Specialist
Author

This did not work for me. It gave me error like "Error: Error in expression')' expected"

manideep78
Partner - Specialist
Partner - Specialist
Author

This gives below error message

Untitled.jpg

sunny_talwar

Try the other expression and see if that is doing what you were looking for.

sunny_talwar

2 Questions:

1) What is the name of your alternate state

     AS_NoSel or

     AS_NoSel * $

2) What version of QV are you using? Is it anything below SR8?

manideep78
Partner - Specialist
Partner - Specialist
Author

1. AS_NoSel

2. 11.20 SR7.


The main motto is to get the set reference functionality dynamically. we use 2 charts overlapped and using transparency.

so, the item list box will be in normal state, the chart on the top will be in alternate state, so to be get selected by all the filters which are not under the alternate state, we use AS_NoSel * $ in the expression in first chart.


The chart in the back will be in normal state which will display entire state.

Like this:

chart.jpg

The one that is highlighted is from the front chart and the dimmed ones are from back chart using transparency.


I hope now it was clear.