Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I'll try to be as precise as I can.
I'm doing a sales turnover analysis. I have an xml file made like this:
When an invoice has only one line / item, everything works fine.
When, like in the screenshot, an invoice ( for example KV1206872) has more than one item, if I make a simple table with invoice number, item etc, I can see there are two items sold.
If I do a chart, only one item. The expressions are the issue.
Reading different posts, I made this expression:
=Sum(aggr(sum(TOTAL <invoice_Number> gross_Amount), invoice_Number,item_Code))
Now I can see the two items, but with the same quantity, gross_Amount etc...:
Do I have to make changes in the XML files. Or is there a way to make an expression that works?
Thank you.
Just use: sum(gross_Amount)
Hello Marcus,
Thank you for your help.
But I wouldn't have written if it was so simple.
It's what I did in first place, but as I said, if I simply use sum(grossAmount), I only see one itemand not two of them:
In regard to the expression it should be so simple. If the data doesn't fit to your expectation anything else is wrong respectively different to show your wanted view (any further selections, alternate states, synthetic keys and/or circular loops in the data-model, missing key-values to any related associations, ...).
If I look on your xml the values for ...136 are different to those from ...134 and so both couldn't have the same results like in your screenshot.
I have three xml files, one for Items list, one for customers list and then one for Sales.
Item code and Customer code are my key-values. I don't have any synthetic keys.
Like I said, I don't understand that I can see in a simple table, for this particulare invoice, the two items.
But in the chart table, with the expression, I only can see one item of two.
I'll check if I can do my script in another way.
Something isn't right within your associations. I think you will see it if you extend the table-box for the period-field and the measure fields as well as all fields in which you have currently set any selection.