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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

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
Anonymous
Not applicable

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
July PBI25 Carousel

Power BI Monthly Update - July 2025

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

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 community update carousel

Fabric Community Update - June 2025

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