Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

gkluca82
New Contributor III

Charting a sum

Example.JPG

Hi guys,

i've got a problem.

I'm trying to bar chart a simply measure but i can't get any result.

I want the date on X axis and the Overall time on Y axis but for some reason it doesnt aggregate the value.

In this screenshot i get this value on a row level but it doesnt work on a bar chart.

[Date] (dimension)       [Item N°] (dimension)     [Cycle Time] (dimension)        [Total pieces] (measure)        [Overall time](measure)

Any help?

1 Solution

Accepted Solutions
brijesh1991
Contributor III

Re: Charting a sum

Sum(Aggr(Expression,Dim1, Dim2,Dim3.....))

Where Expression is your sum(Something) and Dim1, Dim2, Dim3 etc are available dimensions in your table.

7 Replies
reddys310
Honored Contributor II

Re: Charting a sum

Hi Luca,

Are you trying to sum a text field? just make use of the num#() function to convert it into a num, and then try the sum() function.

Thanks,

Sangram.

gkluca82
New Contributor III

Re: Charting a sum

Hi Sangram,

it doesnt work.

this is what i'd like to do:

for each [Date]

      for each [Item n°]

          a sum of [Total pieces]*[Cycle time]

to obtain a total time for every item in that date.

Strangely, if i select from the table above a [Cycle time], using it like a filter, the bar chart works, but clearly it show me only the sum of the [Item n°] associated for that particular [cycle time] * [Total pieces].

balrajahlawat
Esteemed Contributor

Re: Charting a sum

try like this?

Expression:  sum(num#([Overall time]))

MVP
MVP

Re: Charting a sum

Hi,

Try

Sum([Cycle Time] * [Total Pieces])

Hope this helps you.

Regards,

Jagan.

gkluca82
New Contributor III

Re: Charting a sum

nope.

the [total pieces] is a measure: (sum(xxx)+sum(yyy))

it seems that the [cycle time] is interpreted like a label instead of a number, but in the data model is formatted like a number

brijesh1991
Contributor III

Re: Charting a sum

Sum(Aggr(Expression,Dim1, Dim2,Dim3.....))

Where Expression is your sum(Something) and Dim1, Dim2, Dim3 etc are available dimensions in your table.

gkluca82
New Contributor III

Re: Charting a sum

thank you, it works!!!