Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
hello everyone, I am a new user of powerbi . I want to know how i can , having two related tables one containing , for each product for each sale made , the amount sold and the invoice value ; in the other table I have the unit costs for each product . Should I create a measure that is the result of the multiplication between the quantity sold of each product to the unit cost of each individual product . Thanks for your help.
Solved! Go to Solution.
Yes you should create a measure for the cost of items sold.
What needs to be done is
1. The Sales and Cost tables should be linked using the Product column in both the tables.
2. Create Measure
CostofSold:=SUMX('SalesTable',[InvoiceQty] *Related(CostTable[Cost]))
3. This will create total of the cost for all the poroducts sold.
4. This measure will get filtered based on the filters / slicers in your application.
If this is what you are looking for please accept as a solution and also give kudos.
In this scenario, you can create either a measure or a column to get expected result.
Cost_of_Sold_Measure = SUMX ( Sales, Sales[Amount Sold] * RELATED ( Cost[Unit Cost] ) )
Cost_of_Sold_Column = Sales[Amount Sold] * RELATED ( Cost[Unit Cost] )
Regards,
In this scenario, you can create either a measure or a column to get expected result.
Cost_of_Sold_Measure = SUMX ( Sales, Sales[Amount Sold] * RELATED ( Cost[Unit Cost] ) )
Cost_of_Sold_Column = Sales[Amount Sold] * RELATED ( Cost[Unit Cost] )
Regards,
Thank may come in handy in other situations 😉
Hi Massimo,
Cool ya , it is very simple in power BI.
Before creating the new measure ensure u have relationship with two tables.
we have several options to solve your prob , pls try this below one .
Measure = sum("Table 1 Sales") * sum("Table 2 Cost")
if not , let me know
Thanks !!!!
Yes you should create a measure for the cost of items sold.
What needs to be done is
1. The Sales and Cost tables should be linked using the Product column in both the tables.
2. Create Measure
CostofSold:=SUMX('SalesTable',[InvoiceQty] *Related(CostTable[Cost]))
3. This will create total of the cost for all the poroducts sold.
4. This measure will get filtered based on the filters / slicers in your application.
If this is what you are looking for please accept as a solution and also give kudos.
Just what I needed too, thanks.
Perfect thank you very much!
Perfect thank you very much!
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
145 | |
85 | |
66 | |
52 | |
48 |
User | Count |
---|---|
215 | |
90 | |
83 | |
67 | |
59 |