Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
salezian
Creator
Creator

Question about sum(total<>)

Dear Qlik fans,

Is there any way to include in total keyword all columns in the chart except two specific. The idea is to include always in the expression all columns in the chart except two specific fields like sum(total<all columns - {column1, column2}>) ? Of course I could write all columns manually but this is ad hoc chart and it would be difficult to manage it.

I'd be grateful for any ideas

BR

1 Solution

Accepted Solutions
sunny_talwar

Because you need $() expansion to let QlikView know that the list that is displayed is actual field names and not just any random list of names....Might be able to read some of it here

The Magic of Dollar Expansions

View solution in original post

12 Replies
niclaz79
Partner - Creator III
Partner - Creator III

Hi,

You say it's an ad hoc chart, does that mean you have a separate selection on which are the columns in the table?

If so, you can create a variable containing the selected columns using the Concatenate() function and then use that in the <$(vConcatenatedDimensions)> in your expression.

salezian
Creator
Creator
Author

I've tried but it doesn't work .... concat(_field,',')

PrashantSangle

try with getfieldSelections(fieldName,',')

Regards

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
sunny_talwar

Is your list of dimension dynamic in anyway? I mean are you just looking to get a nicer looking expression or are you trying to make it dynamic so that if dimension change, the expression is able to change automatically to incorporate changes in dimensions?

salezian
Creator
Creator
Author

Dear all

It's ad-hoc table in which I calculate ratio. It's important to me to calculate correctly denominator.

It should calculate denominator for all dimensions except the 2 dimensions representing categories.

BR

M.

sunny_talwar

How do you select the dimensions for this ad-hoc chart?

salezian
Creator
Creator
Author

There's data island on which user select dimensions and based on this dimensions are conditionally displayed in chart. So I use following condition to display the field

=SubStringCount(Concat(_AdHocTableCode,','),'A10')=1

I've tried to use concat(_AdHocTableField,',') and put in total, but it doesn't work. And I don't understand why.

BR

M.

sunny_talwar

So, here is how you can select the dimensions for total qualifier

TOTAL <$(=Concat(DISTINCT {<_AdHocTableCode -= {'Field1', 'Field2'}>} '[' & _AdHocTableCode & ']', ','))>

Here I am assuming that you will exclude Field1 and Field2 from your total qualifier.... replace them accordingly

salezian
Creator
Creator
Author

Yes this it ! Thanks man.

The only thing I don't understand is why expression total<concat(_AdHocTableCode,',')>

didn't work.