cancel
Showing results for
Did you mean:

The ultimate Microsoft Fabric, Power BI, Azure AI & SQL learning event! Join us in Las Vegas from March 26-28, 2024. Use code MSCUST for a \$100 discount. Register Now

Helper II

## Support for a Calculation

Hi,

Kindly support me to calculate this column

Revenue P1, Total P1 Revenue , Total Labour Cost P1 , Total Labour Cost P1 % --> Separate measures

I want to calculate the "Cost P1" Column. How can I get the excat number?

Cost P1 = Revenue P! * Total Labour Cost P!%

Thanks

1 ACCEPTED SOLUTION
Community Support

### Hi, @Christ_30

According to your describe, there could be several reasons why your measure is returning the same value in the table visual in Power BI. Here are a few possibilities:

1. If you want to realize the result of multiplying two measures in the measure, the writing rule of the measure is very important, you need to check whether the measure uses ALL() or ALLEXCEPT() and so on, these functions can clear the filters of the data table or data columns and use the most primitive data for calculation.
2. If it involves the use of multiple tables, please check the relationship between the two tables.

If the above methods cannot solve the problem, please provide the data table and Measure involved, this will help me provide a more accurate solution.

powerbi - All rows and total of the rows showing same values in power BI - Stack Overflow

Best Regards,
Yang
Community Support Team

If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

3 REPLIES 3
Frequent Visitor

Total Revenue = 438489

Total Cost= 82514

Cost% = 18.8

Total Labour Cost by Category =
CALCULATE(
SUM('Sales'[LabourCost]),
ALLEXCEPT('Sales', 'Sales'[Category])
)

Whatever are the names of your columns and tables, use them as per your choice.

Community Support

### Hi, @Christ_30

According to your describe, there could be several reasons why your measure is returning the same value in the table visual in Power BI. Here are a few possibilities:

1. If you want to realize the result of multiplying two measures in the measure, the writing rule of the measure is very important, you need to check whether the measure uses ALL() or ALLEXCEPT() and so on, these functions can clear the filters of the data table or data columns and use the most primitive data for calculation.
2. If it involves the use of multiple tables, please check the relationship between the two tables.

If the above methods cannot solve the problem, please provide the data table and Measure involved, this will help me provide a more accurate solution.

powerbi - All rows and total of the rows showing same values in power BI - Stack Overflow

Best Regards,
Yang
Community Support Team

If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

Community Champion

In Power BI, you can create a new calculated column using the DAX (Data Analysis Expressions) language to calculate the "Cost P1" based on the formula you provided: Cost P1 = Revenue P1 * Total Labour Cost P1 %.

Here's a step-by-step guide:

1. Open Power BI Desktop:

• Launch Power BI Desktop and open your report.
2. Go to Data View:

• Click on the "Data" view to see your data table.

• In the Fields pane, find your table.
• Right-click on the table name and choose "New Column."
4. Enter DAX Formula:

• In the formula bar, enter the following DAX formula:

Cost P1 = 'YourTableName'[Revenue P1] * 'YourTableName'[Total Labour Cost P1 %]

• Make sure to replace 'YourTableName' with the actual name of your table.
1. Press Enter:

• Press Enter to apply the formula.
2. Review Results:

• Go back to the report view, and you should see a new column named "Cost P1" with the calculated values.

Now, whenever your "Revenue P1" or "Total Labour Cost P1 %" values change, the "Cost P1" column will automatically update.

Remember to replace 'YourTableName' with the actual name of your table and ensure that the column names match your actual column names. Additionally, make sure the data types of "Revenue P1" and "Total Labour Cost P1 %" are compatible for multiplication (e.g., both numeric).

If you encounter any issues or need further clarification, feel free to ask!

If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly.

In case there is still a problem, please feel free and explain your issue in detail, It will be my pleasure to assist you in any way I can.

Announcements

#### Microsoft Fabric Community Conference

Join us at our first-ever Microsoft Fabric Community Conference, March 26-28, 2024 in Las Vegas with 100+ sessions by community experts and Microsoft engineering.

#### Power BI Monthly Update - February 2024

Check out the February 2024 Power BI update to learn about new features.

#### Microsoft Fabric Career Hub

Explore career paths and learn resources in Fabric.

#### Microsoft Fabric Partner Community

Engage with the Fabric engineering team, hear of product updates, business opportunities, and resources in the Fabric Partner Community.

Top Solution Authors
Top Kudoed Authors