Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
padmanabhan_ram
Creator II
Creator II

Expression to find the next minimum value

Hi All,

I have a below table

MonthNoProductSales
Jan-13A12

Feb-13

A45
Mar-13A76
April-13A34
Feb-13B98
Mar-13B54
Apr-13B65

I am storing the Minimum MonthNo value in a 'vMonthNo' variable.

When I do "if(MonthName_Vol_Chart =vMonthNo,Sales,'') to get the Sale value for starting month.

I get the value for Product A as 12 but I do not get any value against Product B and I understand that it's because there no value for product B.

How can I make the expression flexible enough to get the values for the product B.

Note: There can be many Products like B which might have the same behaviour.

Thanks in advance,

Padmanabhan

1 Solution

Accepted Solutions
15 Replies
PrashantSangle

Hi,

Can you post sample app also provide your expected output.

Regards

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
martinpohl
Partner - Master
Partner - Master

take this expression:

sum( if( aggr(nodistinct min(MonthNo), Product) = MonthNo, value, 0))

unfortunately, set analysis doen't work at this problem.

Regards

settu_periasamy
Master III
Master III

hi,

may be try this..

Create the variable like

vMonthNo    :    aggr(Min(MonthNo),Product)    //(don't give equal sign)

Expression

=if(MonthNo=$(vMonthNo),Sales,'')

tresesco
MVP
MVP

Use expression like:

=FirstSortedValue( Sales, MonthName_Vol_Chart)

With Product in dimension in chart, you would get the sale value for it's earliest date;

padmanabhan_ram
Creator II
Creator II
Author

Hi All,

I do not get the value points with the suggestions provided.

Please find the attached qvw. I want the line graph to show the values on the data points of starting month and ending month.

Regards,

Padmanabhan

padmanabhan_ram
Creator II
Creator II
Author

Forgot the attachment.

padmanabhan_ram
Creator II
Creator II
Author

Hi Tresesco,

Thanks for your response, but it didn't work.

I have attached the qvw for your reference.

Regards,

Padmanabhan

padmanabhan_ram
Creator II
Creator II
Author

Hi Max,

I have attached the qvw for your reference.

Regards,

Padmanabhan

padmanabhan_ram
Creator II
Creator II
Author

Hi

Thanks for your response, but it didn't work.

I have attached the qvw for your reference.

Regards,

Padmanabhan