Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Pivot/straight table using multiple dimensions in single column

Hi,

I am wondering if this is possible. We are wanting to remake a report that users are having to manually make now days using QlikView, and I am wondering if it is possible to do in a single straight table or pivot table. The problem comes in that the columns are not only based on different dimensions, but can also be different calculations.

The report would have data as follows:

Monthly
Sep-12Sep-11
% change in State A subscribers10%2%
% change in State B subscribers5%-4%
% change in State C subscribers7%8%
# of new subscribers from telemarketing5020
# of new subscribers from door to door405
% of new subscribers from telemarketing30%10%
% of new subscribers from door to door25%15%

So the first 3 lines in the example are a percet change based on locaiton of all subscribers, the next two is the total number of new subscribers based on where they came from, and the next 2 are the percentage of the above 2 numbers.

Is this possible in a straight or pivot table? I am wondering if I am just going to have to seperate the items out into seperate tables for this to work, but thought I would ask the question before doing this. (I.E. have one table for the first 3, another table the next 2, and then a 3rd table for the final 2).

Thanks ahead of time

1 Solution

Accepted Solutions
Not applicable
Author

in ur load script, create an inline wizard;

load * inline[

Dim,DimValue

1,  % change in State A subscribers   

2, % change in State B subscribers   

3, % change in State C subscribers   

4, # of new subscribers from telemarketing   

5, # of new subscribers from door to door             

6, % of new subscribers from telemarketing   

7, % of new subscribers from door to door

];

now in ur straight table, use DimValue as ur dimension & in expression1(Sep-12) use

if(Dim=1,sum({<ActualDim={Actual Dim value for which u need say A 10%}>} Metric1)/sum({<ActualDim={Actual Dim value for which u need say A 10%}>} Metric2),

if(Dim=2,sum({<ActuaDim={Actual Dim value for which u need say B 5%}>} Metric1)/sum({<ActualDim={Actual Dim value for which u need 5% say B}>} Metric2))

since ur result is in %, so i've used division in expr assuming ur actual expr must be something like this

the if can be expanded to Dim7

Same for expr2

Hope it helps

View solution in original post

3 Replies
Not applicable
Author

in ur load script, create an inline wizard;

load * inline[

Dim,DimValue

1,  % change in State A subscribers   

2, % change in State B subscribers   

3, % change in State C subscribers   

4, # of new subscribers from telemarketing   

5, # of new subscribers from door to door             

6, % of new subscribers from telemarketing   

7, % of new subscribers from door to door

];

now in ur straight table, use DimValue as ur dimension & in expression1(Sep-12) use

if(Dim=1,sum({<ActualDim={Actual Dim value for which u need say A 10%}>} Metric1)/sum({<ActualDim={Actual Dim value for which u need say A 10%}>} Metric2),

if(Dim=2,sum({<ActuaDim={Actual Dim value for which u need say B 5%}>} Metric1)/sum({<ActualDim={Actual Dim value for which u need 5% say B}>} Metric2))

since ur result is in %, so i've used division in expr assuming ur actual expr must be something like this

the if can be expanded to Dim7

Same for expr2

Hope it helps

Not applicable
Author

So make sure I understand correctly. In my script I create a seperate table that denotes each row I need (and is not connected to any other tables, which is called a data island correct?). Then my expression is a bunch of if statements that based on which row I am looking at, I calculate a different value/metric.

Correct?

By doing this, will I still be able to filter on other dimension values? I.E. different comapnies. Off hand I think it should because as long as i don't specify a specific one in the expression it should, right?

Thanks

Not applicable
Author

yeah right...go ahead....