Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Top value of 100 using set analysis?

Hi

I have a database like below

Date               Sales

2016-01-01        65

2016-02-01        75  

2016-03-01         81

2016-04-01          92

2016-05-01          99

2016-06-01        102

2016-07-01         111

2016-08-01        154

2016-09-01        201

2016-10-01         2650

2016-11-01         568

2016-12-01         5689


i want get a date which one is sales=100 or near to 100  i.e  102  (2016-06-01 )



How to get this



Thiru

18 Replies
Not applicable
Author

Hi Sunny

Small doubt on this

=date(FirstSortedValue({<sales = {'>=100'}>}YearMonth, sales)) is working fine

but when i am trying to pass the value 100 using variable it is not working  like blow

=date(FirstSortedValue({<sales = {'>=('$(Max %)')'}>}YearMonth, sales ))

Pleas do the needful

Thiru

sunny_talwar

May be try this:

=Date(FirstSortedValue({<sales = {'>=$(=Max %))'}>}YearMonth, sales))


or


=Date(FirstSortedValue({<sales = {'>=$(=$(Max %)))'}>}YearMonth, sales))

Not applicable
Author

Hi Sunny

Date(FirstSortedValue({<sales = {'>=$(='$(Max %)')'}>}YearMonth, sales ))

This is the Correct Answer

Thanks

Thiru

Not applicable
Author

Hi Sunny

If you have done earlier some thing like below can you please help me in this

thread no:225070

Adding crashimage or any custom image Actual VS Target

Thanks in Advance

Thiru

Not applicable
Author

Hi Sunny

continuous for the above

i want to do the same for expression it is not a coulmn directly coming from database

it is like the below

FirstSortedValue({<$(V_Sales_Forcast) = {'>=$(='$(Max %)')'}>}YearMonth, $(V_Sales_Forcast))

Variable=$(V_Sales_Forcast)=(((Sales+Rangesum(above(sum(Sales),0,240))+((Sales*$(Sales Annual Growth Rate))/100))/Sales_target)*100)

Can you please do the needful this kind of scenarios how we can calculate the date when this expression =100

Thiru

sunny_talwar

This isn't possible. There might be workarounds for this, but I will need to see a sample application to propose anything here

Not applicable
Author

Hi Sunny,

ok

i will upload a sample application  and Let you know

Thanks

Thiru

Not applicable
Author

Hi Sunny

I have added my sample application

Please check here

action date on chart based on max value

Thiru

Not applicable
Author

Hi Sunny

I have added that sample application

action date on chart based on max value

I need to calculate the when it will reach max based on my sales growth rate input value  and based on that i need to give 1 or 2 years prior notice the system.

And if possible need  to add some meaningful images in that .

Thanks

Thiru