Skip to main content
cancel
Showing results for 
Search instead 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

Reply
Christ_30
Helper II
Helper II

Support for a Calculation

Hi,

 

Kindly support me to calculate this column

 

Christ_30_0-1701244149626.png

 

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
v-yaningy-msft
Community Support
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.

Here are some related links:

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!

How to get your questions answered quickly --  How to provide sample data in the Power BI Forum

View solution in original post

3 REPLIES 3
BeingAslam
Frequent Visitor

Hi @Christ_30 

 

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.

 

v-yaningy-msft
Community Support
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.

Here are some related links:

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!

How to get your questions answered quickly --  How to provide sample data in the Power BI Forum

123abc
Community Champion
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.
  3. Add New Column:

    • 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.

Helpful resources

Announcements
Fabric Community Conference

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.

February 2024 Update Carousel

Power BI Monthly Update - February 2024

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

Fabric Career Hub

Microsoft Fabric Career Hub

Explore career paths and learn resources in Fabric.

Fabric Partner Community

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