Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Get Current Selections for CYC group

Something is wrong with my format.

I want my expression to be an if statement based on the Dimension from the cyc group.

My expression is as follows:

If(Match(GetCurrentSelections([Date Cyc]), 'Scheduled'),

sum(DailyHours))

expression.jpg

The error says "Bad field name."  Date Cyc is the name of my Cyclic Group. and Scheduled is the label for the expression in that group.

Any help would be greatly appreciated.  Thank you in advance.

3 Replies
sunny_talwar

I think you might be looking for GetCurrentField(). GetCurrentSelections() doesn't take any arguments:

If(Match(GetCurrentField([Date Cyc]), 'Scheduled'), Sum(DailyHours))


GetCurrentField ‒ QlikView

Anonymous
Not applicable
Author

snap.jpg

Thanks for the quick response.  It says that the expression is okay, but the red error underline is contradicting that.  So there is no data to display in the chart.  Do have some syntax wrong?

sunny_talwar

Did you try clicking okay to see if the expression is giving you the output you were looking for. I think this is an issue for GetCurrentField() function. Expression editor doesn't recognize it, but it works. You can also try this since you are checking for just one field:

If(GetCurrentField([Date Cyc]) = 'Scheduled', Sum(DailyHours))