cancel
Showing results for
Did you mean:

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

New Member

## Creating order amount and shipped amount Measures for Matrix visual

I can't use calculated columns to multiply two columns "Order Quantity" and "Sales Price" initially to get the overall Order Amount.

The Order Amount and Shipped Amount use different dates, and I need to get them both into a Matrix Visual

Initially I use SumX('table', 'table'[column1] * 'table' [column2] to get the Order Amount. But I need to specify the date somehow with regard to "Shipping Amount" in order to get the measure necessary to implement the second row into the Matrix. As both Order Amount & Shipping Amount has same formula but according to the orderdate or shippingdate the sum value changes according to month and year. When I introduce both order amount and shipping amount in a table visual along with one of the date column they both are showing same values either order amount values or shipping amount values according to the date type I am considering.

Order amount and shippedamount, orderdate, shippingdate all 4 are in same table. But, I do have another table called INVOICE where I have below columns.

In this table I tried to create shippingamount column by just using sum(Invoice Amount) which is giving me similar values to order amount when observed with invoice month

I hope I am explaining this right. Any help would be appreciated.

Thank you
NS

1 ACCEPTED SOLUTION
Super User

It's a good start

- Products is a dimension table and should control Orders in a 1:* relationship. Looks like you have duplicates in the Products table though, you may want to clean that up

- I would argue that Orders and Invoices are independent facts, don't join them directly. Unless you can guarantee that you only ever have one invoice for one order.  Or refute my assumption

- Add a calendar table to your data model.  You always, always need a claendar table.  Link it to the order date (active) and the ship date (inactive)

7 REPLIES 7
New Member

This is my data model

Super User

It's a good start

- Products is a dimension table and should control Orders in a 1:* relationship. Looks like you have duplicates in the Products table though, you may want to clean that up

- I would argue that Orders and Invoices are independent facts, don't join them directly. Unless you can guarantee that you only ever have one invoice for one order.  Or refute my assumption

- Add a calendar table to your data model.  You always, always need a claendar table.  Link it to the order date (active) and the ship date (inactive)

New Member

Thank you, It worked.

I need to create a bar graph using the shipped amount and ordered amount. which should be like this.

But when I am trying to achieve this I got graphs like below

I am not sure exactly how can I solve this. My date_table code is

Date_Table =
VAR _Table=
CALENDAR(DATE(2013,1,24),DATE(2014,2,31)),
"Consecutive Week Number",WEEKNUM([Date],2)
+ 52
* ( YEAR ( [Date] ) - YEAR (DATE(2013,1,24) ) ),
"Week Number & Year","W" & WEEKNUM([Date]) & " " & YEAR([Date]),
"WeekYearNumber",YEAR([Date]) & 100 + WEEKNUM([Date]),
"MonthShortYear",FORMAT([Date],"mmm-YYYY")
)
RETURN
_Table
Super User

your first screenshot is too small. Can't see what you need.

New Member

Super User

Please show the expected outcome based on the sample data you provided.

Super User