Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Announcements
Leverage your QlikView investment to modernize BI – see how! Join Group
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Creator
Creator

Expression Set Analysis

Hi at all,

I have a dataset with one field called data and another one called unit price

I would like to create a formula that shows me the first available unit price for a specific product, i have created a variable called MinData with this formula =Min(data)

And then i wanted to try this one

Avg({<data = $(=MinData)>}Unit_Price)

But it doesn't work, anyone can help me with this..

Best regards

Andrea

1 Solution

Accepted Solutions
Highlighted
Partner
Partner

Re: Expression Set Analysis

MinData variable settings I have added expression as =Date(Min(data))

avg({<data={"$(MinData)"}>}Unit_Price)

Hope it works

View solution in original post

11 Replies
Highlighted

Re: Expression Set Analysis

May be flower bracket missed as syntax of set expression

Avg({<data = {$(=MinData)}>}Unit_Price)

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
Highlighted
Creator
Creator

Re: Expression Set Analysis

Hi Anil

I tried with curly brakets in that position but it hasn't worked too

Partner
Partner

Re: Expression Set Analysis

Try below expression

Avg({<data = {"=$(=MinData)"}>}Unit_Price)

or

Avg({<data = {"=$(MinData)"}>}Unit_Price)

Highlighted

Re: Expression Set Analysis

Try this

Avg({<data = {'$(MinData)}>}Unit_Price)'

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
Highlighted
Creator
Creator

Re: Expression Set Analysis

with this solutions it calcs the average considering all the unite price and it doesn't give to me the only first one

Highlighted
Partner
Partner

Re: Expression Set Analysis

Can you share some sample data to debug.

Highlighted
Creator
Creator

Re: Expression Set Analysis

This one for example.

In the first text box i would like to see the first price, for example for the product A. So the correct value should be 1,1

Andrea

Highlighted
Partner
Partner

Re: Expression Set Analysis

Check below expression

=aggr(avg(Unit_Price),Product)

Highlighted
Creator
Creator

Re: Expression Set Analysis

With that expression the result is 1.188 so the mean of all that value, so it is not give to me the min data unit price (01/01/2017 = 1,1)