Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Set analysis writing

Hello

I am strugling a little bit with a set analysis formula.

I am placing bubble on a chart. The Y axis can be selected using a "cyclic group "

The X axis is based on a static dimension

I would like the bubble size to correspond to the pourcentage of the record of the columns

Something like Sum( X,Y)/Sum (X)

I am trying to use a set analysis to calculate the sum X but it's not working

  • UTS = name of the group
  • NB_Xtrem = name of the metrics
  • sum( {<$(=GetSelectedField(UTS))=  >} NB_Xtrem);

sum( {<$(=GetSelectedField(UTS))=  >} NB_Xtrem);

the last } in red is underlined in red in qlikview

Must be stupid but I can't find the solution.

Lionel

Labels (1)
7 Replies
tresB
Champion III
Champion III

Try:

getcurrentfield( YourGroup )

sum( {<$(=GetCurrentField(UTS))=>} NB_Xtrem)

This should work.

Not applicable
Author

Thanks for the reply

I getting a result now but it seems that the selection is still applied

i have created 2 metrics,

  • sum(NB_Xtrem)
  • sum( {<$(=GetCurrentField(UTS))=>} NB_Xtrem)

And they are giving the same value for a given bubble.

I would have expected the last one to be the same for all the bubbles of a given value of the X axis (UTS in on the Y axis).


Not applicable
Author

Thanks to "Tres qv" i have made some progress.

the getCurrentField instruction is working, I can see in a text box that the correct field is listed.

But i am still facing an issue, the set analysis doesn't seems to work as I obtain the same value for the 2 metrics (see above)

Any idea ?

tresB
Champion III
Champion III

I am not sure if i have got your point. To have the same value for all X-axis, try this:

Sum({<$(=GetCurrentField(UTS))=>} TOTAL NB_Xtrem)

jagan
Partner - Champion III
Partner - Champion III

Hi,

You can try the if statement like this

If(GetCurrentField(UTS) ='Dimension1', Sum({<Dimension1=>} TOTAL NB_Xtrem),

     If(GetCurrentField(UTS) ='Dimension2', Sum({<Dimension2=>} TOTAL NB_Xtrem),

     '

     '

     '

     '

Hope this helps you.

Regards,

Jagan.

CELAMBARASAN
Partner - Champion
Partner - Champion

Hi,

In Set analysis you can only use field names as a Set Modifier. Here your expression has functions which is not possible. Please Go with jagan mohan suggestion.

Even you cannot use {'1'}={'1'} in set analysis like we are doing in sql.

Regards,

Celambarasan

Not applicable
Author

Finaly based on Jagan proposal i have solved the issue with variables.

As the number and value of the X axis are predefined and limited (10) i have created one variable per value of the X axis, each of them dynamcally calculated

I can then in the bubble chart use a test to divide the value of each bubble of a given value of the x axis by the  cumulated value of all the bubbles for the same value of the x axis (stored in a varible)

Thanks