Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Not applicable

Determing the associated values of a maximum

I have a column in a straight table in which I determine a maximum, using set analysis:

max({$<Rate-={}>} Sales)

In the second column I want to load the (minimum) value of 'Rate' associated with this maximum of Sales.

How can I do this?

1 Solution

Accepted Solutions
pover
Honored Contributor

Determing the associated values of a maximum

Does your table have a dimension?

Try somthing like this

=min({$<Sales={$(=max({$<Rate-={}>} Sales))}>} Rate)

Regards.

2 Replies
pover
Honored Contributor

Determing the associated values of a maximum

Does your table have a dimension?

Try somthing like this

=min({$<Sales={$(=max({$<Rate-={}>} Sales))}>} Rate)

Regards.

rluciano1012
New Contributor II

Determing the associated values of a maximum

Hi, Karl, I'm trying to take your example here and apply it to my model.  I'm trying to get the highest/max sales day by location and then the sales date it occurred on.  The maximum Net Sales is working correctly, but I can't get it to pull in the SalesDate.  Here are the two expressions I'm using.

//TO GET THE MAXIMUM OR HIGHEST SALES AMOUNT

max({$<SalesDate-={}>} NetSales)

//TO GET THE SALES DATE THE MAXIMUM SALES AMOUNT OCCURED ON

max({$<NetSales={$(=max({$<SalesDate-={}>} NetSales))}>} SalesDate)

I've tried several different set analysis formulas to get the date and I can't seem to figure it out.  Does it have something to do with the date field?  The date format being used in the load scipts/tables is MM/DD/YYYY

Also, as you can see, I am using StoreName as my only dimension in this table.

StraightTableResult.jpg

Community Browser