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
tatac1412
Helper I
Helper I

ayuda con dax para hacer un if con una variable tipo string

HOlaa necesito su ayuda estoy haciendo un dax para una tabla en donde pueda según el la variable  "IndicadorF" sea mayor a 90 y la variable "indicador_202_desc"= "Gestantes con fecha de parto o cesarea" me coloque el color de texto pero me saca error de que no me reconoce "indicador_202_desc".

tatac1412_0-1701985658777.png

El dax es este:

Metas = if('Resolución 202'[IndicadorF]>90 && 'Resolución 202'[indicador_202_desc]="Gestantes con fecha de parto o cesarea","#33C600")
 
Me ayudan porfa.
Gracias
1 REPLY 1
v-junyant-msft
Community Support
Community Support

Hi @tatac1412 ,

Sorry but the information you've provided is too little for me to determine what your problem is.
First I suggest you check that the column name is spelled correctly. Then if you are working within a filter context, as in a measure, you may need to use the SELECTEDVALUE function to get the current value of the "indicator_202_desc" column:

SELECTEDVALUE('Resolución 202'[indicador_202_desc]) = "Gestantes con fecha de parto o cesarea"

If you still can't solve your problem, please provide more details, e.g. is this a metric or a calculated column? What is the data model of the data you are using?

Best Regards,
Dino Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

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