0
votes

I am trying to create a simple bar chart in power bi that combines the number of orders received and the number of orders shipped in two separate columns so the two can be closely compared. I can't figure out how to go about this? In the data model I have an order date column, a shipment date column, an order day column (which has Mon, Tue, Wed etc...) and a shipment day column (again has Mon, Tue etc...). See below:

enter image description here

I have a measure which simply calculates the number of orders/shipments by counting the rows:

Volumes = COUNTROWS('DIM-Order')

Currently I have two separate bar charts. One displaying the number of orders taken on each week day:

enter image description here

The other displaying the number of orders shipped on each week day:

enter image description here

I would like these bar charts to be combined into one with the two separate values (each week day order and shipment volumes) so they can be closely compared.

New issue: I have is that the cluster chart is't displaying the correct values. See below. There are 1400 rows for orders on Sunday (this is 100% correct as I have filtered it in the data view) and in the cluster chart is shows the value as 0. All the other values seem to be incorrect as well.

Cluster chart:

[![enter image description here][4]][4]

enter image description here

1
Do you wants Day wise SUM(order weekday number) and SUM(shipment weekday number) together?mkRabbani
Do you have a calendar table, you can them use USEREALTIONSHIP to combine these measures and calendar items to map correctlyJon
@mkRabbani Yes I do. Jon, I have a separate 'Weekday' table which has two columns. 1 column for the weekday number (1 - 7) and one column for the weekday name (Mon, Tue, Wed etc...). Forgive me, I am not very experienced with Power BI. How would I go about using the USEREALTIONSHIP?Bail P

1 Answers

1
votes

If you are simply wants to compare your records by Day regardless any other breakdown, you can follow these below steps to achieve your requirements-

First go to Power Query Editor and create a new table using this below code. Suggesting new table as the source table might be related to other presentations.

let
    Source = your_source_table_name, //-- Use original table name
    #"Removed Other Columns" = Table.SelectColumns(Source,{"order day", "order weekday number", "shipment weekday number"}),
    #"Unpivoted Other Columns" = Table.UnpivotOtherColumns(#"Removed Other Columns", {"order day"}, "Attribute", "Value")
in
    #"Unpivoted Other Columns"

Now you will have data as below-

enter image description here

Now get back to your report by clicking Close and Apply button. Add a Clustered Column Chart in the report and configure as shown below-

enter image description here