Qlik Community

QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

zagzebski
Contributor

Function to get all of 1 dimension

I need to be able to create an expression that would give revenue by area for group 1 divided by the revenue of by area for ALL groups. I have tried different ways (using TOTAL) but can't get it to do what I am looking for...

GroupAreaRevenue
1North$
  1,000.00
1South$
  2,000.00
1East$
  3,000.00
1West$
  4,000.00

Note: I need to be able to filter on Group 1 in this example.

Thanks in advance...

Tags (2)
1 Solution

Accepted Solutions
Highlighted

Re: Function to get all of 1 dimension

Hi,

one example:

QlikCommunity_Thread_137643_Pic1.JPG.jpg

QlikCommunity_Thread_137643_Pic2.JPG.jpg

QlikCommunity_Thread_137643_Pic3.JPG.jpg

QlikCommunity_Thread_137643_Pic4.JPG.jpg

QlikCommunity_Thread_137643_Pic5.JPG.jpg

QlikCommunity_Thread_137643_Pic6.JPG.jpg

//creation of sample data

tabRevenue:

LOAD Ceil(RecNo()/4) as Group,

    Pick(Mod(RecNo()-1,4)+1,'North','South','East','West') as Area,

    Money(Round(Rand()*4000,0.01)) as Revenue

AutoGenerate 16;

hope this helps also

regards

Marco

View solution in original post

4 Replies
gabriel_kirst
Contributor III

Re: Function to get all of 1 dimension

Hi!

Take a look on the attached file. Is that what you're looking for?

I did a sum(TOTAL <Group> Revenue). This make a group by in your sum by "Group".

Regards,

Gabriel

MVP
MVP

Re: Function to get all of 1 dimension

sum(Revenue) / sum(total <Group> Revenue)

or   sum(Revenue) / sum(total <Area> Revenue)

Highlighted

Re: Function to get all of 1 dimension

Hi,

one example:

QlikCommunity_Thread_137643_Pic1.JPG.jpg

QlikCommunity_Thread_137643_Pic2.JPG.jpg

QlikCommunity_Thread_137643_Pic3.JPG.jpg

QlikCommunity_Thread_137643_Pic4.JPG.jpg

QlikCommunity_Thread_137643_Pic5.JPG.jpg

QlikCommunity_Thread_137643_Pic6.JPG.jpg

//creation of sample data

tabRevenue:

LOAD Ceil(RecNo()/4) as Group,

    Pick(Mod(RecNo()-1,4)+1,'North','South','East','West') as Area,

    Money(Round(Rand()*4000,0.01)) as Revenue

AutoGenerate 16;

hope this helps also

regards

Marco

View solution in original post

ashwanin
Valued Contributor

Re: Function to get all of 1 dimension

Hi,

Please go through the below qvw. It will provide you the result,which you required.