Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hello everyone!
I'm trying to create a "Available UCI Beds" measure that subtracts two columns, a column called "Total UCI Beds" minus another "Covid 19 Occupied UCI Beds" but doesn't give me the option to select them. When I try to write them I get a message "Failed to resolve name 'beds'. It is not a valid table, variable, or function name".
Does anyone know how I can solve it?
Solved! Go to Solution.
Hello @ManuelEspitia
In additon to lkalawski's response,when constructing a measure, it is necessary to use the sum function to add the number type column.
You must create a measure as follows:
Measure = Sum(Table(Total UCI Beds))-Sum(Table(Covid 19 Occupied UCI Beds))
And you'll get the result, but you can't see the result in the data view. You must create a visual to display the result of the measure.
If you want to use the columns to calculate the result directly and display the result in the data view, you can create a calculated column.
Calculated Column = Table(Total UCI Beds)-Table(Covid 19 Occupied UCI Beds)
For more information in Calculated Column and Measure:
Walkthrough: Create Calculated Columns in Power BI Desktop
Tutorial: Create your own measurements in Power BI Desktop
Calculated columns vs. measurements
Best regards
Rico Zhou
If this post helps,then consider Accepting it as the solution to help other members find it more quickly.
Hello @ManuelEspitia
In additon to lkalawski's response,when constructing a measure, it is necessary to use the sum function to add the number type column.
You must create a measure as follows:
Measure = Sum(Table(Total UCI Beds))-Sum(Table(Covid 19 Occupied UCI Beds))
And you'll get the result, but you can't see the result in the data view. You must create a visual to display the result of the measure.
If you want to use the columns to calculate the result directly and display the result in the data view, you can create a calculated column.
Calculated Column = Table(Total UCI Beds)-Table(Covid 19 Occupied UCI Beds)
For more information in Calculated Column and Measure:
Walkthrough: Create Calculated Columns in Power BI Desktop
Tutorial: Create your own measurements in Power BI Desktop
Calculated columns vs. measurements
Best regards
Rico Zhou
If this post helps,then consider Accepting it as the solution to help other members find it more quickly.
When creating a measure, you must use an aggregate function to get the data into columns.
In your case, create a calculated column and subtraction will work.
More information about measures and calculated columns: https://www.sqlbi.com/articles/calculated-columns-and-measures-in-dax/
_______________
If I helped, please accept the solution and give kudos! 😀
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
111 | |
100 | |
80 | |
64 | |
58 |
User | Count |
---|---|
148 | |
111 | |
93 | |
84 | |
66 |