Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

dmcd3110
New Contributor III

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

Re: Set Analysis Query

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

25 Replies

Re: Set Analysis Query

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

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

Re: Set Analysis Query

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
Valued Contributor

Re: Set Analysis Query

I second Sunny Talwar and Bill Markham

Luminary
Luminary

Re: Set Analysis Query

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

Luminary
Luminary

Re: Set Analysis Query

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.

fawazeez
Contributor

Re: Set Analysis Query

Hi Diane,

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

dmcd3110
New Contributor III

Re: Set Analysis Query

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

Luminary
Luminary

Re: Set Analysis Query

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

dmcd3110
New Contributor III

Re: Set Analysis Query

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

Community Browser