Qlik Community

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
QlikWorld 2022, LIVE in Denver CO., May 16-19, 2022. REGISTER NOW TO RECEIVE EARLY BIRD PRICING
cancel
Showing results for 
Search instead for 
Did you mean: 
jplozano
Contributor
Contributor

Conditional Set Expresion

Hi guys!

I have a problem with one dashboard. I´m calculating the variation between dates with Set Analysis. This variation can be calculated for 3 distinct clients but i want than the variation value only appears when i select ONLY ONE value.

In other graphics i have more information and i can compare the values for all clientes and i cant force to filter just for a value.

My comparison set analysis is this:

(((Sum({$<Fecha_Valor = {"$(=Date(v_max_date))"}>} [Valor Liquidativo]) - Sum({$<Fecha_Valor = {"$(=Date(v_min_date))"}>} [Valor Liquidativo]))*100)/Sum({$<Fecha_Valor = {"$(=Date(v_max_date))"}>} [Valor Liquidativo]))/100

Valor Liquidativo is my measure.

Fecha_Valor is my time dimension.

Cartera is my new dimension to add.

Could you help me please?

Thank you very much!!

Regards

1 Solution

Accepted Solutions
petter
Partner
Partner

Maybe this will work for you:

=If( Count(DISTINCT Client)=1 ,

(((Sum({$<Fecha_Valor = {"$(=Date(v_max_date))"}>} [Valor Liquidativo]) - Sum({$<Fecha_Valor = {"$(=Date(v_min_date))"}>} [Valor Liquidativo]))*100)/Sum({$<Fecha_Valor = {"$(=Date(v_max_date))"}>} [Valor Liquidativo]))/100

)

View solution in original post

3 Replies
petter
Partner
Partner

Maybe this will work for you:

=If( Count(DISTINCT Client)=1 ,

(((Sum({$<Fecha_Valor = {"$(=Date(v_max_date))"}>} [Valor Liquidativo]) - Sum({$<Fecha_Valor = {"$(=Date(v_min_date))"}>} [Valor Liquidativo]))*100)/Sum({$<Fecha_Valor = {"$(=Date(v_max_date))"}>} [Valor Liquidativo]))/100

)

View solution in original post

jplozano
Contributor
Contributor
Author

Hi!.

I applied this solution but i use GetSelectedCount from the new field .

Thank you very much!!

petter
Partner
Partner

Yes GetSelectedCount() is obviously an alternative way of doing it - should actually be slightly faster too.