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

Range of expression value in chart

Hi!

I want to do a distinct count of salespersons and the sales per hour and present them within the sales per hour in ranges 0-50, 51-100, 101-150 and 150+.

ex

=if(sum(sales)/sum(hour)<=50,'0-50', etc..

I've tried to add a calculated dimension to a chart wich and then add distinct salesperson as expression but it doesnt seem to work.

Any suggestions?

 

 

4 Replies
rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

You will need to wrap your calculated dimension in an Aggr() to indicate that you want to calculate sales per hour by salesperson. 

=Aggr(if(sum(sales)/sum(hour)<=50,'0-50', etc.., salesperson)

-Rob
http://masterssummit.com
http://qlikviewcookbook.com
http://www.easyqlik.com

Meg00
Contributor III
Contributor III
Author

Hi, thank you but that doesn't do it, or I didn't understan.

Maybe I need to explain it better.

Here are my tables

AmountHourID
10011
10022
5013
15014

 

Firstly I want to see how much per hour each row is worth (Amount/Hour), (100, 50, 50, 150 in the examples above).

After doing that, I want to present it in a bar chart where the bars represent value per hour in the ranges 0-50, 51-100, 101-150 counting per distinct ID. This is just an example, ID can appear more than once in the ID table and range is larger in the actual data. I just can't figure out how to first create the value of Amount/Hour.

Also, sorry for posting this in the wrong place instead of the "new to QV" section of the forum:)

kacimi
Contributor
Contributor

hello 

i facing the same problem here did you find any solution

Kushal_Chawda

@Meg00  If you want the accurate answer then create some sample data based on actual data set and let us know the expected output out for that sample data.