Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Create fields within dimension using existing fields

Hi all,

Hope you can help me, really need this solved but dont know how.

I'm loading a lot of data on customer and product level. One dimension is named "Type" and contains the Fields "Sellings Costs" and "Net Sales Value" and more.

The dimension "Type" is created by a separated file, the original sales data cointains GL acounts. A group of GL Accounts creates a Type.

In the load script I first load the sales data on GL account level and already group some GL accounts when using the "+" or "-" function. So far no problem.

Now I want the Type "Selling Costs" /  "Net Sales Value" as "Selling Costs %".

The problem is that this number is put into the datatable as a fixed number. If I create a chart that shows data on a higher level than customer and product, that the values of "Selling Costs %" are being summed.

So if I have one customer that buys two products and on both products he receives 50% Selling Costs on the Net Sales Value and I present the sales of this account in the chart but not on the product level, the outcome is 100%. This is 50% + 50%. The correct outcome is 50%.

For the presentation it is required that I use only one column / dimesion. The expression should also be only one colomn. So it looks something like this:

TypeBudgetActual
Net Sales Value10090
Sellings Costs2530

Selling Costs %

0.250.33

Anybody got an idea?

Thanks in advance,

René

9 Replies
Not applicable
Author

Rene,

I think you are using an expression like

Sum([Selling Costs]/[Net Sales Value])

Switch to the below:

Sum([Selling Costs])/sum([Net Sales Value])

Kiran.

Not applicable
Author

Thanks Kiran,

But the problem is in the loadscript, are you sure tthis is what you mean? Cause I cant type your sollution in the loadscript.

thanks Ren'e

Not applicable
Author

Thanks Kiran,

But the problem is in the loadscript, are you sure tthis is what you mean? Cause I cant type your sollution in the loadscript.

thanks Ren'e

Not applicable
Author

Thanks Kiran,

But the problem is in the loadscript, are you sure tthis is what you mean? Cause I cant type your sollution in the loadscript.

thanks Ren'e

Not applicable
Author

Thanks Kiran,

But the problem is in the loadscript, are you sure tthis is what you mean? Cause I cant type your sollution in the loadscript.

thanks Ren'e

Not applicable
Author

Thanks Kiran,

But the problem is in the loadscript, are you sure tthis is what you mean? Cause I cant type your sollution in the loadscript.

Thanks René

Not applicable
Author

Thanks Kiran,

But the problem is in the loadscript, are you sure tthis is what you mean? Cause I cant type your sollution in the loadscript.

Thanks René

Not applicable
Author

Yes. This is not for load script. Can you share your data model for suggesting changes?

Kiran.

Not applicable
Author

Hi Kiran,

You answer ws so far helpfull that I decided to build the data structure differently. Now we make the Selling Costs % in an expression.

I tried to avoid this but I think its the only way.

So thanks for thinking with me.

Ren'e