Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello is there any way to count the result of a GetFieldSelections variable?
(Sum({<[Sales Rep Goal Percents.Month] = {$(=vMonthSelection)}>}[Sales Rep Goal Percents.Percent]) / (COUNT($(=vMonthSelection)) * 32)) * Sum([Goal Data.2016 GOAL])
vMonthSelection defined as:
=GetFieldSelections([Month])
I want to count the number of months selected if the user selects more than 1 month. I can see that it looks like an array so does Qlik sense support counting selections?
Please help
Maybe this could be helpful as well:
getselectedcount (FieldName [, IncludeExcluded [, State]])
Returns the current number of selected values in a field. It is possible to query an alternate state.
If IncludeExcluded is true the count will include selected values, which are currently excluded by selections in other fields. If false or omitted these values will not be included.
State is the alternate state to query.
Examples
getselectedcount ( Year )
getselectedcount ( Year, true( ) )
May be this:
(Sum({<[Sales Rep Goal Percents.Month] = p(Month)>} [Sales Rep Goal Percents.Percent]) / (COUNT(Month) * 32)) * Sum([Goal Data.2016 GOAL])
what does p() do?
Maybe this could be helpful as well:
getselectedcount (FieldName [, IncludeExcluded [, State]])
Returns the current number of selected values in a field. It is possible to query an alternate state.
If IncludeExcluded is true the count will include selected values, which are currently excluded by selections in other fields. If false or omitted these values will not be included.
State is the alternate state to query.
Examples
getselectedcount ( Year )
getselectedcount ( Year, true( ) )
Hi,
To get the count of selected values you can simply use
GetSelectedCount(FieldName)
Hope this helps you.
Regards,
jagan.