Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

scotly-victor
Contributor

How can I get Table column value and use it in Measure

Hi,

How can I get Table column value and use it in Measure


Please find Image for reference

9 Replies
darkhorse
Valued Contributor

Re: How can I get Table column value and use it in Measure

Hi,

You can only set one value at a time to right hand-side of set analysis. You cannot go further than [SUB CATEGORY] = {$(vGroup1)} .

Let us know what would you like to achieve exactly so maybe we can try to find a workaround.

Best Regards

Serhan

MVP
MVP

Re: How can I get Table column value and use it in Measure

Please keep in mind that Set Analysis cannot be sensitive to the values of a chart Dimension, because Set Analysis conditions are being applied before the chart is calculated.

However, the sum() in a chart will already calculate the measure for the values of your dimensions. You don't need to add this condition again. Or, are you trying to calculate a total by Category? Then, use the prefix TOTAL, like this:

sum(TOTAL <Category> Value)

when Category is one of your chart dimensions.

cheers,

Oleg Troyansky

Learn advanced QlikView and Qlik Sense techniques in my book QlikView Your Business

scotly-victor
Contributor

Re: How can I get Table column value and use it in Measure

What actually need is

I want use corresponding column value in my set analysis in Straight  Table

column 1  column 2(measure)

banana   sum({fruit={'banana'}}sales)

apple    sum({fruit={'apple'}}sales)

likewise I should get the output

Is there any function there to achieve this.

shraddha_g
Honored Contributor III

Re: How can I get Table column value and use it in Measure

If your column 1 is Fruit ,then you don't need set analysis as sum({<fruit={'apple'}>}sales). Sum(Sales) will work.

scotly-victor
Contributor

Re: How can  I  get Table column value and use it in Measure

Column1 works on GetFieldSelections

selected value should be shown in column1

shraddha_g
Honored Contributor III

Re: How can  I  get Table column value and use it in Measure

can you share the sample app?

MVP
MVP

Re: How can  I  get Table column value and use it in Measure

So if nothing is selected in Fruit field, it should not show all fruits unlike in normal sum(Sales) expression, right?. If so, you could just put an additional check like:  if(GetSelectedCount(Fruit), Sum(Sales))

darkhorse
Valued Contributor

Re: How can I get Table column value and use it in Measure

Hi,

Simply =sum(sales) should work then, shouldn't it????

column 1  column 2(measure)

banana   sum(sales)

apple    sum(sales)

Assuming your table structure is correct!!!

Best Regards

Serhan

imrencimen
New Contributor III

Re: How can I get Table column value and use it in Measure

İf TOTAL function is insufficient try AGGR function.

Sum(Aggr(([BILL ID]),[SUB CATEGORY]))

Community Browser