Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have an IF statement as a variable in set analysis. I want it to show both Assigned and Completed items if nothing else in this field is selected but I am unable to figure this out.
This is what I tried:
vHideUnassigned = If(GetSelectedCount(AssignedCompleted) = 0, 'Assigned' and 'Completed', GetFieldSelections(AssignedCompleted))
Measure in Chart:
Count({<AssignedCompleted={'$(=$(vHideUnassigned))'}>}AssignedCompleted)
Or this
If(GetSelectedCount(AssignedCompleted) = 0, Count({<AssignedCompleted = {'Assigned', 'Completed'}>}AssignedCompleted), Count(AssignedCompleted))
Hi Dan,
Can you tell me what does AssignedCompleted field contain?
And I think you got your if statement wrong for vHideUnassigned variable.
It can be like this
vHideUnassigned = If(GetSelectedCount(AssignedCompleted) = 0, 'Assigned'&chr(44)& 'Completed', GetFieldSelections(AssignedCompleted))
This should give you two results for the variable.
HTH
Thanks,
vHideUnassigned = If(GetSelectedCount(AssignedCompleted) = 0, Chr(39)& 'Assigned' & Chr(39)&chr(44)& Chr(39)&'Completed'& Chr(39),GetFieldSelections(AssignedCompleted))
Count({<AssignedCompleted={"$(=vHideUnassigned)"}>}AssignedCompleted)
great, please close this thread by marking a correct and any helpful answers
This did not work. I'm thinking it still must have something to do with all the quotes .
This field contains the values Assigned, Unassigned, and Completed. I want these two values returned so that my chart will default to having these two items displayed, but will also allow changes in selection from the listbox . It may have something to do with the way the variable is in the set analysis but this isn't displaying anything on my chart. I'm trying to figure out how to get the quotations rights as I think that might be the issue.
May be this
Count({<AssignedCompleted *= {'Assigned', 'Completed'}>}AssignedCompleted)
Or this
If(GetSelectedCount(AssignedCompleted) = 0, Count({<AssignedCompleted = {'Assigned', 'Completed'}>}AssignedCompleted), Count(AssignedCompleted))
This was a different way at looking at the expression that I had not considered but it is a good idea and also much less complex to look at. Thank you!