Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
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.

 

Labels (1)
10 Replies
sunny_talwar
MVP
MVP

Awesome