Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
aisolomatin
Contributor III
Contributor III

How to avoid to many expressions with Dimentionality() ?

Hi there!

I got Pivot table with 6 dimensions and expression, wich depends on level of Dimesionality().

Is it possible to make this expression simplier and combine all cases to one line?

Thanks a lot)

=Pick(Match(Dimentionality(),0,1,2,3,4,5,6),

     Avg(Aggr(1 - Sum(Val1)/Sum(Val2), myDate),

     Avg(Aggr(1 - Sum(Val1)/Sum(Val2), myDate, dim_1),

     Avg(Aggr(1 - Sum(Val1)/Sum(Val2), myDate, dim_1, dim_2),

     Avg(Aggr(1 - Sum(Val1)/Sum(Val2), myDate, dim_1, dim_2, dim_3),

     Avg(Aggr(1 - Sum(Val1)/Sum(Val2), myDate, dim_1, dim_2, dim_3, dim_4),

     Avg(Aggr(1 - Sum(Val1)/Sum(Val2), myDate, dim_1, dim_2, dim_3, dim_4, dim_5),

     Avg(Aggr(1 - Sum(Val1)/Sum(Val2), myDate, dim_1, dim_2, dim_3, dim_4, dim_5, dim_6))

1 Reply
woshua5550
Creator III
Creator III

can you provide a sample app? I'm not quite clear how it works