Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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
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
Try:
getcurrentfield( YourGroup )
sum( {<$(=GetCurrentField(UTS))=>} NB_Xtrem)
This should work.
Thanks for the reply
I getting a result now but it seems that the selection is still applied
i have created 2 metrics,
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).
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 ?
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)
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.
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
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