Forum Discussion
Distinct text
- 8 years ago
Hi zoemostert,
As each product item can be involved in different order ID, absolutely, it will show a lot of same product per order ID when you add both of these two fields into a table visual. It doesn't make sense to remove duplicates, only to display unique product item. Unless you remove the Order ID field from table visual.
To show the revenue by each product, you could try below solution.
Create a summarized table.
Summarize Order details = SUMMARIZE ( 'Order details', 'Order details'[OrderID], "Item Description", FIRSTNONBLANK ( 'Order details'[Item description], 1 ) )
In 'Total Invoiced', add a calculated column to list product name.
Item = LOOKUPVALUE ( 'Summarize Order details'[Item Description], 'Summarize Order details'[OrderID], 'Total invoiced'[OrderID] )
Create two measures:
Aantal_producten = CALCULATE ( COUNTA ( 'Order details'[Item description] ), FILTER ( 'Order details', 'Order details'[OrderID] = MAX ( 'Total invoiced'[OrderID] ) ) ) Total invoiced per Item = CALCULATE ( SUM ( 'Total invoiced'[Total invoiced] ), ALLEXCEPT ( 'Total invoiced', 'Total invoiced'[Item] ) )
Then, drag relative columns from 'Total invoiced' and above two measures into table visual.
The above solution applies to the scenario where each Order ID contains only one product type. If the relationship between OrderID and Item description is many to many, your requirement cannot be achieved according to current information.
Besides, I have attached the .pbix file for your reference.
Best regards,
Yuliana Gu
I want to see the revenue by each product. Now i see the revenue per order ID. And a lot of the same products.
Hi zoemostert,
As each product item can be involved in different order ID, absolutely, it will show a lot of same product per order ID when you add both of these two fields into a table visual. It doesn't make sense to remove duplicates, only to display unique product item. Unless you remove the Order ID field from table visual.
To show the revenue by each product, you could try below solution.
Create a summarized table.
Summarize Order details = SUMMARIZE ( 'Order details', 'Order details'[OrderID], "Item Description", FIRSTNONBLANK ( 'Order details'[Item description], 1 ) )
In 'Total Invoiced', add a calculated column to list product name.
Item = LOOKUPVALUE ( 'Summarize Order details'[Item Description], 'Summarize Order details'[OrderID], 'Total invoiced'[OrderID] )
Create two measures:
Aantal_producten = CALCULATE ( COUNTA ( 'Order details'[Item description] ), FILTER ( 'Order details', 'Order details'[OrderID] = MAX ( 'Total invoiced'[OrderID] ) ) ) Total invoiced per Item = CALCULATE ( SUM ( 'Total invoiced'[Total invoiced] ), ALLEXCEPT ( 'Total invoiced', 'Total invoiced'[Item] ) )
Then, drag relative columns from 'Total invoiced' and above two measures into table visual.
The above solution applies to the scenario where each Order ID contains only one product type. If the relationship between OrderID and Item description is many to many, your requirement cannot be achieved according to current information.
Besides, I have attached the .pbix file for your reference.
Best regards,
Yuliana Gu
- zoemostert8 years agoHelper I
Yuliana you're the best! After step two I allready had the desired result. Thank u so much.