Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
nvijay5757
Creator
Creator

bar chart to display percentile

Hi,

Row LabelsAverage of Average Speed Grand Total46.29787234

VIN1 43.38888889
VIN2 44.86363636
VIN3 41.32727273
VIN4 46.39622642
VIN5 48.76712329
VIN6 48.3902439
VIN7 46.30769231

 

for this will display as Histogram of frequency and percentile.

can anyone help me.

or in bar chart will display as histogram x-axis: average speed

y-axis percentile of vins frequency.

thanks.

Labels (3)
1 Solution

Accepted Solutions
SunilChauhan
Champion II
Champion II

ignore above suggestion

please try below

Create a Variable in Variable overview i.e on GUI

 

vPercentile=Fractile([Average Speed],0.50) and the try below

Count(distinct if([Average Speed] <=$(vPercentile),VIN_ID))

Sunil Chauhan

View solution in original post

7 Replies
SunilChauhan
Champion II
Champion II

POC:
LOAD
[VIN_ID] & [Average Speed] AS Key,
Sn.No,
VIN_ID,
Trip_ID,
"Average Speed"

FROM [lib://test/Dummy_Data_HWD.xlsx]
(ooxml, embedded labels, table is Dummy_Data);

LEFT JOIN (POC)
Load *,
Fractile([Average Speed],0.50) as Percentile;
LOAD
Key,
Avg([Average Speed]) AS [Average Speed]
Resident POC
Group By Key;

 

and in Bar Expression

 

Count(distinct if([Average Speed] <= Percentile,0.50),VIN_ID))

Sunil Chauhan
nvijay5757
Creator
Creator
Author

Hi Thanks for your reply,

can you please check in above script invalid expression. and below bar expression also some error.

 

 

SunilChauhan
Champion II
Champion II

Share Excel which you loading here

Sunil Chauhan
nvijay5757
Creator
Creator
Author

Hi please find the attached file.

ignore my above expression.

requirement is to display 

 x-axis: average speed

y-axis percentile of vins frequency.

Thanks.

SunilChauhan
Champion II
Champion II

ignore above suggestion

please try below

Create a Variable in Variable overview i.e on GUI

 

vPercentile=Fractile([Average Speed],0.50) and the try below

Count(distinct if([Average Speed] <=$(vPercentile),VIN_ID))

Sunil Chauhan
nvijay5757
Creator
Creator
Author

Hi,

Thanks its working.

actually my thought is to create variable for user enter percentile. 

in this case we have taken variable as vPercentile. so how can i take for that user enter percentile.

ex: Enter Percentile: 

SunilChauhan
Champion II
Champion II

Take one input box and select variable .

Now you can change by entering values in input box .

And it will assign to variable and chart will change according to that.

Sunil Chauhan