Qlik Community

QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

Not applicable

How to get calculated dimension value in Expressions

Hi,

I have calculated dimension and I gave its label name "Transaction." but When I tried to get dimension value in expression by using its label name "Transaction".I can't get the value.Please help me how can I access dimesion value in expressions.

if possible please attach sample wlikview document.

Thanks

saifur

7 Replies
MVP
MVP

Re: How to get calculated dimension value in Expressions

Have you tried repeating your calculated dimension definition in your expression?

Like this, having a calculated dimension

=Month(Date)

and check the dimension value in your expression like

=sum(if (Month(Date) < 7, Sales, Budget))

Not applicable

Re: How to get calculated dimension value in Expressions

Hi,

You can create a variable and pass the value of calculated dimension in that variable. In this way, you can call this variable in your calculated dimension and in your expression.

Example:

1. Create a variable vName and place your calculated dimension.

$(vName) = Aggr(only(Name),Names)

2. Create a calculated dimension and place your variable inside

=$(vName)

3. Create an expression and call the created variable

sum({<Name = {$(vName) }>} sales)

Regards,

Janzen

Not applicable

Re: How to get calculated dimension value in Expressions

Hi Thanks for the help.Actually I have max transaction number in my calculated dimension list and based on max number I have to put its related column "Amount" whatever the amount is max or min.in expression it shows me max transaction number but its correspondant amount column shows me max value which I don't want.I want the transaction numbers and its related amount .

Not applicable

Re: How to get calculated dimension value in Expressions

Hi Thanks for the help.Actually I have max transaction number in my calculated dimension list and based on max number I have to put its related column "Amount" whatever the amount is max or min.in expression it shows me max transaction number but its correspondant amount column shows me max value which I don't want.I want the transaction numbers and its related amount .

MVP
MVP

Re: How to get calculated dimension value in Expressions

Instead of a calculated dimension, try two expressions:

=max([Transaction Number])

= FirstSortedValue(Amount, -[Transaction Number] )

assuming that your Transaction Number is a pure number, not a string.

Not applicable

Re: How to get calculated dimension value in Expressions

Thanks for your prompt reply.All possible expression I have already checked.I have attached the excel file where u will get two sheet.one sheet holds raw data and another holds the sample output.If possible please check.It will be very helpful if I got the solution.

Thanks

saifur

MVP
MVP

Re: How to get calculated dimension value in Expressions

Sorry, I don't really understand your sample output.

As I understood you want to show per ItemNumber one line with the highest Transaction number and its corresponding date and stock?

In your example, I see two lines for ItemNumber 110111081501110, and I don't see the highest transaction number, which as far as I've taken from your sample data, is 3675275.

Are you looking at a specific warehouse?

Attached a sample application.

Community Browser