Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
amgelain
Regular Visitor

Add fixed value to variable values

Hello,

 

I need to add the fixed values ​​per company to the variable values ​​per company. I ask for help in creating the DAX formula.

 

Grateful.

amgelain_0-1698079129963.png

 

1 ACCEPTED SOLUTION
123abc
Community Champion
Community Champion

It sounds like you want to create a DAX formula in Power BI or another similar data analysis tool to add fixed values to variable values for different companies. In DAX, you can use the SUMX function to iterate through a table and apply calculations. Here's a general outline of how you can create a DAX formula for this purpose:

Assuming you have a table with columns like "Company," "FixedValue," and "VariableValue," you can create a calculated column or a measure to calculate the sum of fixed and variable values per company.

Here's an example of how you can create a calculated column:

 

TotalValue = [FixedValue] + [VariableValue]

 

This formula creates a new column called "TotalValue" that adds the "FixedValue" and "VariableValue" for each row in your data.

If you want to calculate the total sum of these values for each company, you can create a measure using SUMX and SUMMARIZE:

 

TotalSum = SUMX(
SUMMARIZE(
YourTableName,
YourTableName[Company]
),
[FixedValue] + [VariableValue]
)

 

Replace "YourTableName" with the actual name of your table. This measure calculates the sum of fixed and variable values for each company in your table.

You can then use this measure in your reports to display the total sum of values per company.

Please adapt the DAX formula to your specific data structure and requirements. If you have a different data model or need more specific guidance, provide more details about your data structure, and I can assist you further.

 

 

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.

 

View solution in original post

3 REPLIES 3
123abc
Community Champion
Community Champion

It sounds like you want to create a DAX formula in Power BI or another similar data analysis tool to add fixed values to variable values for different companies. In DAX, you can use the SUMX function to iterate through a table and apply calculations. Here's a general outline of how you can create a DAX formula for this purpose:

Assuming you have a table with columns like "Company," "FixedValue," and "VariableValue," you can create a calculated column or a measure to calculate the sum of fixed and variable values per company.

Here's an example of how you can create a calculated column:

 

TotalValue = [FixedValue] + [VariableValue]

 

This formula creates a new column called "TotalValue" that adds the "FixedValue" and "VariableValue" for each row in your data.

If you want to calculate the total sum of these values for each company, you can create a measure using SUMX and SUMMARIZE:

 

TotalSum = SUMX(
SUMMARIZE(
YourTableName,
YourTableName[Company]
),
[FixedValue] + [VariableValue]
)

 

Replace "YourTableName" with the actual name of your table. This measure calculates the sum of fixed and variable values for each company in your table.

You can then use this measure in your reports to display the total sum of values per company.

Please adapt the DAX formula to your specific data structure and requirements. If you have a different data model or need more specific guidance, provide more details about your data structure, and I can assist you further.

 

 

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.

 

Hello,

Your opinion was important for me to finalize the formula.

Grateful.

123abc
Community Champion
Community Champion

You are wellcome.

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.