Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello Qlikkers,
In my application I have multiple filters and tables. But the measures of my tables change with the kind of filter value selected. For example-
Right now, the expression for calculating SE is-
"=if(getselectedcount(CinemaRx)=0,
(sqrt(Sum(ALL Aggr(
Sqr(Sum(UtilityWt)-(Sum(TOTAL <CinemaStratum> UtilityWt)/Count(DISTINCT ALL <CinemaStratum> CinemaPSU))) * (Count(DISTINCT ALL <CinemaStratum> CinemaPSU)/(Count(DISTINCT ALL <CinemaStratum> CinemaPSU)-1))
, CinemaPSU, CinemaStratum)))/4),
(sqrt(Sum(ALL Aggr(
Sqr(Sum(UtilityWt)-(Sum(TOTAL <CinemaStratum> UtilityWt)/Count(DISTINCT ALL <CinemaStratum> CinemaPSU))) * (Count(DISTINCT ALL <CinemaStratum> CinemaPSU)/(Count(DISTINCT ALL <CinemaStratum> CinemaPSU)-1))
, CinemaPSU, CinemaStratum)))))"
But I also need to add another condition inside the if statement. If getselectedcount(CinemaRx) OR getselectedcount(CinemaNumber) either of them is 0 then I want the the first expression to be executed. I tried the following expression but it is not working-
"=if(getselectedcount(CinemaRx)=0 OR getselectedcount(CinemaNumber)=0,
(sqrt(Sum(ALL Aggr(
Sqr(Sum(UtilityWt)-(Sum(TOTAL <CinemaStratum> UtilityWt)/Count(DISTINCT ALL <CinemaStratum> CinemaPSU))) * (Count(DISTINCT ALL <CinemaStratum> CinemaPSU)/(Count(DISTINCT ALL <CinemaStratum> CinemaPSU)-1))
, CinemaPSU, CinemaStratum)))/4),
(sqrt(Sum(ALL Aggr(
Sqr(Sum(UtilityWt)-(Sum(TOTAL <CinemaStratum> UtilityWt)/Count(DISTINCT ALL <CinemaStratum> CinemaPSU))) * (Count(DISTINCT ALL <CinemaStratum> CinemaPSU)/(Count(DISTINCT ALL <CinemaStratum> CinemaPSU)-1))
, CinemaPSU, CinemaStratum)))))"
i.e. if no value is selected from either of these two filters than the expression must be divided by 4.
Any help regarding this will be highly appreciated. Thank you.
Hi @tas_taba1
It should be working or we need a better explanation of your issue; I downloaded your QVF file, and implemented the condition you described, while adding some visualization objects to view the selections behaviour; I also created a variable vExpression containing your expression, as it is easier to manage the UI, and debug it; I attached v3 of your sample application