Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

TrendLines based on count of Dimension values??


Hello,

I am working on one combo chart with date as dimension and has one expression in it....

Expressions :

 

SUM

({<IDGRUEMP = {'0022'},IDESCENA={'01'},CODJEN2={'10060000'},ACUMTEMP ={'DAY'},CODJEN4 = {'41180000'},CODFASE ={'99','FR'}>}ISAFCCDP)* 0.000000001

and i want to draw tred line based on the average of the above expression....

i mean if i select 6 dates of the month... the reference line expression shoudl be sum()/6

if i select 25 dates of the any month... the reference line should be sum()/25

I mean the division is based on the number of values or selections in the dimension.

thanks in advance for the great help.

Regards,

Siva

17 Replies
Not applicable
Author

Excellent, it worked now... Thanks a lot for all your help....

sunny_talwar

No problem Siva

I am glad I was able to help.

I would ask you to close this thread if you are satisfied with the answer by marking the correct answer and any helpful answers.

Best,

Sunny

Not applicable
Author

i am trying to make it as correct answer...but am getting only "Mark as Helpful" option... how to mark it as correct answer option?

sunny_talwar

Don't you see something like this on bottom left?

Correct.PNG

Not applicable
Author


Hi Siva,

Try this:

(SUM

({<IDGRUEMP = {'0022'},IDESCENA={'01'},CODJEN2={'10060000'},ACUMTEMP ={'DAY'},CODJEN4 = {'41180000'},CODFASE ={'99','FR'}>}ISAFCCDP)* 0.000000001 )/ getselectedcount(<date field>)

Not applicable
Author

The "Correct answer" is not appearing in this thread....   ...i have marked as helpful for the timebeing... and will update with correct option once this started appearing...

Thanks a lot for your help...

sunny_talwar

No problem Siva.

Thank you for looking into it at least.

Best,

Sunny

Not applicable
Author


Thanks for your reply...

this expression is partly satify my requirement..... if i dont select anything on the date field, i dont see anything..

i wanted to get the result based on the dimension values.... irrespective of date selections...

Here is the correct expression (Provided by Sunny -- Thanks to him)

=If((Sum({<IDGRUEMP = {'0022'},IDESCENA={'01'},CODJEN2={'10060000'},ACUMTEMP ={'DAY'},CODJEN4={'41180000'},CODFASE={'99','FR'}>}ISAFCCDP)* 0.000000001) <
((Sum(TOTAL {<IDGRUEMP = {'0022'},IDESCENA={'01'},CODJEN2={'10060000'},ACUMTEMP ={'DAY'},CODJEN4={'41180000'},CODFASE={'99','FR'}>}ISAFCCDP)* 0.000000001)/COUNT(TOTAL Distinct FECDATA)), Red(), Green
())

Regards

Siva