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: 
Not applicable

Using Variable as a Dimension

I have a variable/set analysis problem that i have tried to resolve for the last couple of day without much success. I hope this forum could point me to the right direction.

I have a variable,

vRate =(
               (
sum(aggr(sum(DISTINCT [RegionA]), [TransID]))*0.21) +
               (
sum(aggr(sum(DISTINCT [RegionB]), [TransID]))*0.25 )
               )
               /
               (
              
Count({$<Complete= {">0"}>} DISTINCT [TransID] )+
              
Count({$<Review= {">0"}>} DISTINCT [TransID] )+
              
)

I  want to select, and ultimately count stores where $(vRate) <= x%  on table 1 and where   $(vRate) >=y% on table 2.

Something like  Count({<$(vRate)<={y}>}Stores) but its throwing errors at the..{3}>..) mark. What could I be doing wrong?

I also tried to load the variable as a script using both LET and SET vRate =(…);

                                                          LOAD $(vRate) AS [Rate] on QVW without success.

 

10 Replies
sunny_talwar

Awesome