Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I am trying to build a dimension from aggr statement when in an alternate state.
my expression is
if(getselectedcount(myfield)>1,
if(wildmatch(fieldB,'*123*'),count distinct(ID2),count distinct(ID))
,count distinct(ID))
The idea is when myfield has more that one selection use a dimension that is the original list.
so the dimension would be:
if(getselectedcount(myfield)>1, aggr({$},myfield,myfield),myfield)
But I am having trouble switching to the original series when in an alternate state.
Thanks.
Not 100% sure what you trying to do, but may be this:
If(GetSelectedCount(myfield) > 1, Aggr(Only({$} myfield), myfield), myfield)
Here is an example of what I am trying to do and have uploaded a qvw.
When more than one company is selected I am trying to append and extra row of data to the table
In this instance the flag 'All' will be used to append the data
=if(GetSelectedCount(Company)>1,
sum(DATA1) and wildmatch(company,'All'),//Having trouble with this line
sum(DATA2))
I hope the example explains it.
Maybe I need a better flag on the data to append.
I don't see a qvw attached Neil. Can you reattach it please
Here is the attachment, thanks.
Are you saying that when you click on D-ALL you would like to see all the companies? (A, B, C, and may be D)
I wanted to hide D-All from the Company list box using wildmatch.
Then when the getselected>1 is triggered, append A to a pivot or straight table
I think you need a And-Mode selection. This may not work for your situation, but worth taking a look.
In the mean time I am looking for alternatives
Is it about hiding the 'D-All' member from the list box, or, adding an extra line in the chart? If you get an extra line in the chart with 'All' - what value do you wish to see against it? Total sum?
The problem that I have in the real set of data is that I dont know if A,B or C is to be summed, but I do know that the D-ALL will always be in the chart as long as there are more than 1 selected companies
Please think in terms that A,B,C are totals and D - All is a forecast.
So I will need to SUM A,B or C to make total and have D-All in the same chart.
At the moment the user will not be able to select D-All, it will appear based on getselected count.
Later on I will remove D-All from the list box using not wildmatch *- All*