# QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Highlighted
New 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

Tags (4)
1 Solution

Accepted Solutions MVP

## Re: Conditional Set Expresion

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

)

3 Replies MVP

## Re: Conditional Set Expresion

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

)

New Contributor

## Re: Conditional Set Expresion

Hi!.

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

Thank you very much!! MVP

## Re: Conditional Set Expresion

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