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.
Hi all,
I want to put you in situation. For a project, I'm changing the excel with power pivot to power bi. I'm trying to use the same parameters, measures, tables, datasources etc... In the way to do I'm suffering an error with a measure. the error is that:
The thing is in the excel file I'm not sure if is a measure or calculate column. I tested with both cases and the error is the same that I paste before.
The measure that I'm using is:
Color Rentabilidad Flex = if([TotalBrutoRentabilidad]>0;CALCULATE ( VALUES ( 'TramosRentabilidad'[sDescripcion] );FILTER ( 'TramosRentabilidad'; ([Rentabilidad]*100) >= 'TramosRentabilidad'[fValMinTramo] && ([Rentabilidad]*100) < 'TramosRentabilidad'[fValMaxTramo] )))
Solved! Go to Solution.
Hi @Anonymous
You may try to use aggregated function like MIN,MAX...to instead of VALUES.For example:
Color Rentabilidad Flex = IF ( [TotalBrutoRentabilidad] > 0, CALCULATE ( MAX ( 'TramosRentabilidad'[sDescripcion] ), FILTER ( 'TramosRentabilidad', ( [Rentabilidad] * 100 ) >= 'TramosRentabilidad'[fValMinTramo] && ( [Rentabilidad] * 100 ) < 'TramosRentabilidad'[fValMaxTramo] ) ) )
Regards,
I think , the wrong here is the "Values" parameter the description of the "Values" parameter is "Returns a one-column table that contains the distinct values from the specified table or column. In other words, duplicate values are removed and only unique values are returned."
Someones knows any other command instead of "Values"?
Hi @Anonymous
You may try to use aggregated function like MIN,MAX...to instead of VALUES.For example:
Color Rentabilidad Flex = IF ( [TotalBrutoRentabilidad] > 0, CALCULATE ( MAX ( 'TramosRentabilidad'[sDescripcion] ), FILTER ( 'TramosRentabilidad', ( [Rentabilidad] * 100 ) >= 'TramosRentabilidad'[fValMinTramo] && ( [Rentabilidad] * 100 ) < 'TramosRentabilidad'[fValMaxTramo] ) ) )
Regards,
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 |
---|---|
112 | |
97 | |
85 | |
68 | |
59 |
User | Count |
---|---|
150 | |
120 | |
100 | |
87 | |
68 |