Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Set Analysis Query

Hi

I’m really new to Qlik Sense and am having trouble getting a simple set analysis to work.  I have a qvd of transactions that have columns including ‘Amount’ and ‘Actual_Flag’.  I want to return the amount where the actual flag is ‘A’ but although the expression is accepted by the expression editor I am getting an invalid dimension indicator.

SUM(${<ACTUAL_FLAG={'A'}>}AMOUNT)

Any advice would be appreciated

Thanks

Diane

1 Solution

Accepted Solutions
sunny_talwar

You are now in your inbox and not on the main thread.... click on this link which will take you to the main thread

Re: Set Analysis Query

View solution in original post

25 Replies
sunny_talwar

I think you have misplaced the $ sign to be before {... it needs to be after {

Sum({$<ACTUAL_FLAG={'A'}>}AMOUNT)

Anonymous
Not applicable
Author

Try using double quotes around the A, as in "A" and bear in mind fields are case sensitive so maybe :

SUM (  {< Actual_Flag = {"A"} >} Amount )

zebhashmi
Specialist
Specialist

I second Sunny Talwar and Bill Markham

juraj_misina
Luminary Alumni
Luminary Alumni

Hi Diane,

you say you get "invalid dimension" error, so maybe the problem is somewhere else, because this expression is a measure, not a dimension. Double check other fields in your chart.

Plus, Sunny's and Bill's comments are very true. Your expression as you typed it here contains a typo and field names are case sensitive. In description you say you have fields 'Amount' and 'Actual_Flag' but the expression says AMOUNT and ACTUAL_FLAG. In Qlik this is treated as diffferent columns, so double check field names as well.

Hope this helps

Juraj

shilpan
Partner Ambassador
Partner Ambassador

Identifier $ is implicit so you can remove it. As Sunny has mentioned, it is in the wrong place. All Set Analysis syntax must occur within a pair of curly braces.

fabdulazeez
Partner - Creator III
Partner - Creator III

Hi Diane,

As Juraj said you might  be adding this in dimensions. THE SET EXPRESSION  you mentioned can be a measure only.

Anonymous
Not applicable
Author

Thanks for all the responses, your comments were really helpful.

I've now got it working by addressing the $ issue and creating it as a measure rather than a dimension.

Thanks again

pablolabbe
Luminary Alumni
Luminary Alumni

When applicable please mark the appropriate replies as CORRECT. This will help community members and Qlik Employees know which discussions have already been addressed and have a possible known solution. Please mark threads as HELPFUL if the provided solution is helpful to the problem, but does not necessarily solve the indicated problem. You can mark multiple threads as HELPFUL if you feel additional info is useful to others

Anonymous
Not applicable
Author

Hi Pablo

Happy to, but can you advise how to do this?  When I click in that 'Actions' against replies sent I only see 'Mark as Helpful'.  Am I looking in the wrong place?  Apologies for my ignorance