Skip to main content
Announcements
Accelerate Your Success: Fuel your data and AI journey with the right services, delivered by our experts. Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
johanfo2
Creator
Creator

Distinct values as of time

Hi,

I am trying to create a graph showing the number of distinct values (y-axis) over time (x-axis) for a dataset.

Say:

Time, Value
1,A
2,A
3,B
4,C
5,A
6,Q
etc

 

So the graph shows the total number of distinct value as of that time. At time=1 it is "1" and at time=6 it is "4" in the above example.  After plenty of searches, I have concluded that this is only possible to do during the loading phase (in the script), and that no runtime script solution exists to this problem.  I'm I right, or wrong 🙂 ?

2 Replies
brunobertels
Master
Master

Hi

 

May be try this 

 

aggr(rangesum(

above(

sum(

aggr(

count(distinct "Value")

,"Value")

)

,0,RowNo())),Time,(Numeric))

)

CurtDaughtryBP
Contributor III
Contributor III

Would the accumulation option within the measure modifier be an option? Or using an accumulation technique?

Essentially you are looking for count(distinct Value) grouped by Time. Time is the dimension, count distinct is the measure.

The only difference is that you are trying to accumulate the distinct count over time. Is that correct?

This link shows using the rangesum(above( technique as an alternative approach but I think it may still be a viable path if you wanted.

Hope that helps.

https://community.qlik.com/t5/Qlik-Design-Blog/Recipe-for-a-Pareto-Analysis/ba-p/1468497

https://help.qlik.com/en-US/sense/August2021/Subsystems/Hub/Content/Sense_Hub/Visualizations/Table/t...