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.
Necesito agregar algunos espacios al principio de la columna y esa columna tiene valores de texto.
Creo que esto es técnica y lógicamente posible, pero por qué no está funcionando en power bi.
option1:in power query editor , creó una columna personalizada;
if Text.Length([vdo_nm])<30 then (Text.PadStart([vdo_nm],30-Text.Length([vdo_nm])," "))
Más
[vdo_nm]
que no funcionan en el informe final.
Opción 2: Se ha creado una nueva columna con dax
(" " & app_strm_cntnt_chnl_pgm_mnth_agg[vdo_nm])
No está funcionando también.
¿Alguna idea de cómo resolver?
Solved! Go to Solution.
Funciona - se puede ver en la vista de tabla. Pero las imágenes recortan el principio. Utilice el carácter de espacio de no separación160 en su lugar.
Text.Length([vdo_nm])<30 then (Text.PadStart([vdo_nm],30-Text.Length([vdo_nm]),Character.FromNumber(160))
DAX is for Analysis. Power Query is for Data Modeling
Proud to be a Super User!
MCSA: BI ReportingFunciona - se puede ver en la vista de tabla. Pero las imágenes recortan el principio. Utilice el carácter de espacio de no separación160 en su lugar.
Text.Length([vdo_nm])<30 then (Text.PadStart([vdo_nm],30-Text.Length([vdo_nm]),Character.FromNumber(160))
DAX is for Analysis. Power Query is for Data Modeling
Proud to be a Super User!
MCSA: BI Reportingsi la longitud de un texto es 12, entonces agregará 30-12-18 espacios.
¿Es realmente un espacio o algo más?
No es un espacio, que es ASCII 32. Es un espacio de no separación, pero ocupa el mismo ancho. En la imagen de abajo, esto es 30 del código 160 espacios antes del carácter "FR". La columna "Personalizado" es casi el ancho de esta imagen, por lo que puede ver que está permitiendo que el "espacio" permanezca.
Pruébalo. Simplemente reemplace " " en su código con Character.FromNumber(60).
Tenga en cuenta que debido a que los espacios de kerning no tienen el mismo ancho a menos que cambie la fuente a un ancho fijo, como Courier New.
DAX is for Analysis. Power Query is for Data Modeling
Proud to be a Super User!
MCSA: BI Reporting@saktisahoo2006 debería funcionar, en el primer método, intente agregar otros caracteres y ver si se rellena con el carácter. ¿Tiene un paso después de que esté limpiando o recortando la columna?
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.
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 |
---|---|
2 | |
1 | |
1 | |
1 | |
1 |
User | Count |
---|---|
2 | |
2 | |
2 | |
2 | |
1 |