Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

complex calc in barchart

Hi comm,

i have a bar chart in which i want to show the ratio between sales and retoure of an article.

The article is the articlename plus the size. Its a combined Dimension btw.

My problem is that in the database every article is unique, so i have an articlenumber that unique and i need to do the calc over the articlenumber. But i cant show it in the chart cause its to big. Thats why i have articlename and size as dimension.

So i have sum of sales and sum of retoure like:

Sum({$<[art_ret]= {'sale'}>} amount_RET) //same with retoure just change {'retoure'}

but i dont know how to aggr with my articlenumber when articlename and size are a dimension.

Hope someone can help, thanks in advance!!

-Eric

1 Solution

Accepted Solutions
Not applicable
Author

i used an other coloum now and it works!!

mistake from me sorry for that!!!

View solution in original post

12 Replies
jonathandienst
Partner - Champion III
Partner - Champion III

I am not sure that I understand your data - if every article is associated with a name and with a size, then your expression should work. To get the ratio, you would need:

=Sum({$<[art_ret]= {'retour'}>} amount_RET) / Sum({$<[art_ret]= {'sale'}>} amount_RET)

If that is not working then your data is nor organised the way I thought. You might want to provide extra information, preferably a small sample with some representative data the the chart that you are trying to build.

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
Not applicable
Author

thx for ur answer,

the problem is that u can sell an article and retoure it and the same article can then be sold again.Thats why u need the articlenumbe rin calc!!

Anonymous
Not applicable
Author

Maybe it makes sense to create a "real field" in the data model instead of using calculated dimension.

Not applicable
Author

i dont calc the dimension.

sorry for my bad english but I want to calc this as my measure!

Not applicable
Author

I think i have a problem with my calc!!!

Sum({$<[art_ret]= {'sale'}>} amount_RET)

This calc gives me the amount of both "retoure" and "sale" back but it should only give me the amount of "sale"!!

Someone see the problem with my syntax

sunny_talwar

Eric is your data model well connected? If it isn't then that could be one of the reason that set analysis doesn't work. Would you be able to share a sample to further investigate this?

Not applicable
Author

the RET table is the only table and it is not connected

sunny_talwar

RET table is the only table in your database? So you have just one table which includes all the fields?

jonathandienst
Partner - Champion III
Partner - Champion III

I am confused if [art_ret]= {'sale'} gives you sales and returns (retour). What does [art_ret]= {'retour'} give you?

I think you would be better off uploading a small sample app with some representative data.

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein