Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more.
Get startedGrow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.
Buen día estimada comunidad, ¿cómo puedo realizar promedios o conteos o cualquier otra operación con campos que contienen texto? Estoy trabajando sobre un reporte de encuestas de satisfacción del cliente y en oportunidades las encuestas no son contestadas pero deben ser contabilizadas como tal, dentro del reporte. Cuando intento determinar el Promedio General de Calificaciones, al poseer valores que son textos, Power Bi no me permite realizar operaciones. ¿Cómo puedo prepar mis datos y solventar este problema? Mi fuente de Datos es un excel que posee tanto la información de las encuentas como cálculos para determinar estas variables pero quiero lograr realizar dichos cálculos desde Power Bi.
PD: Fijarse en la fila que indica "NO CALIFICÓ" y en el campo de "PROMEDIO".
Solved! Go to Solution.
Hi @SofiaG
You can use convert() function to change data type first, then calculate it
e.g
Column =
VAR a =
ADDCOLUMNS (
'Table',
"changetype", IF ( [PROMEDIO] <> "No", CONVERT ( [PROMEDIO], DOUBLE ) )
)
RETURN
AVERAGEX ( a, [changetype] )
You can refer to the following link to know more about the convert() function.
CONVERT function (DAX) - DAX | Microsoft Learn
Best Regards!
Yolo Zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi Yolo Zhu 😊
Thank you very much for your reply. It helped me solve my problem.
You are a genious. 💟
Surely, I will contact you soon.
Sofia G.
Hi @SofiaG
You can use convert() function to change data type first, then calculate it
e.g
Column =
VAR a =
ADDCOLUMNS (
'Table',
"changetype", IF ( [PROMEDIO] <> "No", CONVERT ( [PROMEDIO], DOUBLE ) )
)
RETURN
AVERAGEX ( a, [changetype] )
You can refer to the following link to know more about the convert() function.
CONVERT function (DAX) - DAX | Microsoft Learn
Best Regards!
Yolo Zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Ask questions in Eventhouse and KQL, Eventstream, and Reflex.
User | Count |
---|---|
90 | |
81 | |
65 | |
65 | |
60 |
User | Count |
---|---|
170 | |
114 | |
102 | |
73 | |
69 |