Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
On Demand Webinar: See Why Thousands of QlikView Users Have Switched to Qlik Sense. REGISTER
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
Partner

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

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.
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

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

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

Yes this it ! Thanks man.

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

didn't work.