Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have a set analysis statement that produces a ratio/percentage, something like this:
=(Sum ( {$<flag={'FALSE'}>} counted))/(Sum ( {$<flag=>} counted))
I want this value to be unaffected by users making a selection on the 'flag' value (for use with other charts) - I can replace the $ with 1 to ignore selections, but that ignores all selections. I want the value to be affected by other selections the user chooses.
So, I want it to take into account the 'flag' values set in the statement, but then ignore any user selections on that 'flag' field.
Can this be done, or is there a better way of structuring things?
Thanks
Hi Tom,
It maybe worth sharing a sample app and checking on a small set of data.
{$<flag={'FALSE'}>} Will select in field flag = FALSE regardless of the users selection.
{$<flag=>} Will effectively remove any selections that may be present within the 'flag' field.
Did you check your spelling, capitilisation and spaces in field? Maybe its 'False' or 'false'. Maybe there's a trailing space 'FALSE '. In this type of set analysis you need to be exact.
Regards
Richard
can you make your requirements more precise. Its difficult to understand. If you share any example it will be easy to help
Hi your expression
=(Sum ( {$<flag={'FALSE'}>} counted))/(Sum ( {$<flag=>} counted))
Does the same
Regards
ASHFAQ
If I create a selection box of the 'flag' field, which has the values TRUE and FALSE, and select TRUE, I get nulls for all values, as this:
=(Sum ( {$<flag={'FALSE'}>} counted))/(Sum ( {$<flag=>} counted))
effectively turns to this:
=0/(Sum ( {$<flag=>} counted)
I want to maintain the result generated with the set analysis statement regardless of the 'flag' user selection.
hi,
write like
if(getSelectedCount(Flag)>0,(Sum ( {1<flag={'FALSE'}>} counted))/(Sum ( {1<flag=>} counted)),=(Sum ( {$<flag={'FALSE'}>} counted))/(Sum ( {$<flag=>} counted))
HI,
It must work fine it should not return zero.
Can you share a sample app.
Regards
ASHFAQ
Hi Tom,
It maybe worth sharing a sample app and checking on a small set of data.
{$<flag={'FALSE'}>} Will select in field flag = FALSE regardless of the users selection.
{$<flag=>} Will effectively remove any selections that may be present within the 'flag' field.
Did you check your spelling, capitilisation and spaces in field? Maybe its 'False' or 'false'. Maybe there's a trailing space 'FALSE '. In this type of set analysis you need to be exact.
Regards
Richard
Hi,
Declare a variable in Variable Overview with "Sum ( {$<flag={'FALSE'}>} counted)".
Remember to add a '=' before the expression in the variable Overview window as it makes the expression global and independent of current selection.
Hi Richard,
Sorted - yes that was the case, a mistake on my part. Some very helpful info from everyone else though.
Thanks a lot
Tom
No problem Tom. Pleased you got it sorted!
Richard