Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
Not applicable

Calculated Dimension

Hi Guys,

I have read through a few posts regarding this and havent come across a solution pertaining to my exact problem. What I am trying to do is build some financial reporting. In one of the SQL tables there is a column called AccountGroupDescription. This column has entries like Cost of Sales, Turnover, Current Liabilities et cetera.

What I am trying to do is build a financial dashboard with 4 'fields' in the AccountGroupDescription. This needs to be a pivot table. So I have COS and Turnover, I want to add Gross Profit and Gross Margin % but they need to appear along with the above 2 in the dimension.

I hope my explaination of what I am looking for makes sense and someone knows how I could possible achieve this

Many thanks,

Byron

1 Solution

Accepted Solutions
erich_shiino
Honored Contributor

Calculated Dimension

Hi, Byron

Maybe you could create four expressions instead of a dimension

or

You can create those dimensions at script level

or

use valuelist as a dimension. This can create an artificial dimension, like this:

=valuelist('COS', 'TO', 'GP','GM')

Then, the expressions will need an if statement, like this:

= if( valuelist('COS', 'TO', 'GP','GM') ='COS',SUM( {<AccountGroupDescription = {COS}>} VALUE) ,

if ( valuelist('COS', 'TO', 'GP','GM') ='COS', etc...

Hope this helps,

Erich

4 Replies
Not applicable

Calculated Dimension

Anyone??????

erich_shiino
Honored Contributor

Calculated Dimension

Hi, Byron

Maybe you could create four expressions instead of a dimension

or

You can create those dimensions at script level

or

use valuelist as a dimension. This can create an artificial dimension, like this:

=valuelist('COS', 'TO', 'GP','GM')

Then, the expressions will need an if statement, like this:

= if( valuelist('COS', 'TO', 'GP','GM') ='COS',SUM( {<AccountGroupDescription = {COS}>} VALUE) ,

if ( valuelist('COS', 'TO', 'GP','GM') ='COS', etc...

Hope this helps,

Erich

Not applicable

Calculated Dimension

Excuse my language, but you sir are a fucking legend. Thank you very much...Besides just solving my problem I can see many uses for this type of code

Many thanks man,

Byron

erich_shiino
Honored Contributor

Calculated Dimension

I'm glad I could help! I learnt about valuelist() a few weeks ago!

There are many interesting uses for this!!!

Regards,

Erich

Community Browser