Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Calculated dimension based on expression

Dear all,

I have some trouble with the methodology of calculated dimension and hope for your support

I try to create a table which shows only a specific customer group. For that I've defined the expression "Kundenklasse" with this definition: =If([Accumulated Sales] <= A_Perc_Kunde * Sum(Total IstWert),'A',Null()).

The plan is to see only customers with Kundenklasse A in the table

To realize that I tried to define the selected Dimension (Customer_ID) as calculated dimension with the following expression: =If([Kundenklasse] = 'A',Customer_ID)

Unfortunately it doesn't work QlikView highlight the "Kundenklasse" as bad field name and I don't know why or how to solve this problem.

Does anybody have a clue?

Unbenannt.PNG

Nachricht geändert durch philipp.weiter

1 Solution

Accepted Solutions
Gysbert_Wassenaar

I don't think what you want to do is possible that way. But if you are using QV11 you can use dimension limits instead. Select the option Show only values that accumulate to and put A_Perc_Kunde in the first input field and select relative to the total in the dropdown list next to it.


talk is cheap, supply exceeds demand

View solution in original post

6 Replies
SunilChauhan
Champion
Champion

have you tried this

If(column(1) = 'A',Customer_ID)

column (1) means first Express which Name Kundenklasse

Hope This helps

Sunil Chauhan
Not applicable
Author

Hey Luminary,

thank's for your approach. In my case it's column(4). If I try your formula there is no "bad field" error but it's still not working

The new result:

123.PNG

do you or anybody else have an other idea?

KR,

Philipp

Gysbert_Wassenaar

You need to use the aggr function in your calculated dimension. Perhaps this works:

If([Accumulated Sales] <= A_Perc_Kunde * aggr(Sum(Total IstWert),Customer_ID),Customer_ID)

If it doesn't it would help if you could post the qvw document you're working on or some sample data.


talk is cheap, supply exceeds demand
Not applicable
Author

Hi Gysbert,

thanks for your support. Sadly it doesn't work. Pls find the qvw document in the attachement of my original posts.

Gysbert_Wassenaar

I don't think what you want to do is possible that way. But if you are using QV11 you can use dimension limits instead. Select the option Show only values that accumulate to and put A_Perc_Kunde in the first input field and select relative to the total in the dropdown list next to it.


talk is cheap, supply exceeds demand
Not applicable
Author

That's it! Thanks a lot