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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
icdns
Post Patron
Post Patron

ERROR: No se pudieron cargar los datos para el objeto visual

Hola

Me gustaría tener una condición en la que en si BILLING_PERIOD seleccionado es < marzo 2020 se mostrará el PAGO REGULAR más se mostrará el PAGOS NO REGULAR. He creado una columna con para esto usando la instrucción IF.

Esta es mi fórmula:

REGULAR_NON_REGULAR_COLUMN IF(FACT_PYMTS[DATE] < "March 2020", FACT_PYMTS[REGULAR_PYMT_TIME], FACT_PYMTS[NON_REGULAR_PYMT_TIME])

Sin embargo, im tener este error cuando lo arrastro en mi gráfico de barras.

icdns_0-1599464592164.png

¿Podría alguien ayudarme 😞 ¡Muchas gracias!

9 REPLIES 9
amitchandak
Super User
Super User

@icdns , Está comparando la fecha con un mes. debe ser mes año columna

REGULAR_NON_REGULAR_COLUMN IF(FACT_PYMTS[Month Year] < "March 2020", FACT_PYMTS[REGULAR_PYMT_TIME], FACT_PYMTS[NON_REGULAR_PYMT_TIME])

o formatear y obtener


REGULAR_NON_REGULAR_COLUMN IF(format(FACT_PYMTS[DATE],"MMMM-AAAA") < "March 2020", FACT_PYMTS[REGULAR_PYMT_TIME], FACT_PYMTS[NON_REGULAR_PYMT_TIME])

REGULAR_NON_REGULAR_COLUMN IF(FACT_PYMTS[DATE] <date(2020,03,01) , FACT_PYMTS[REGULAR_PYMT_TIME], FACT_PYMTS[NON_REGULAR_PYMT_TIME])

Si es una medida

REGULAR_NON_REGULAR_COLUMN- IF(format(max(FACT_PYMTS[DATE]),"MMMM-AAAA") < "March 2020", FACT_PYMTS[REGULAR_PYMT_TIME], FACT_PYMTS[NON_REGULAR_PYMT_TIME])

Ambos deben tener un tipo de datos similar FACT_PYMTS[REGULAR_PYMT_TIME], FACT_PYMTS[NON_REGULAR_PYMT_TIME]

AllisonKennedy
Super User
Super User

Pareja de cosas con esto -
1: si desea que funcione cuando se selecciona más de un período de facturación, es posible que deba utilizar SELECTEDVALUE(FACT_PYMTS[DATE])
2: ¿Cuál es el tipo de datos de FACT_PYMTS[Fecha] ? Su DAX Indica que es texto, en cuyo caso no puede usar < "Marzo 2020", por lo que debe cambiarlo a < DATE(2020, 03, 01)
3: ¿Cuál es el tipo de datos para los tipos de pago regulares y no regulares y qué tipo de gráfico está utilizando?

Please @mention me in your reply if you want a response.

Copying DAX from this post? Click here for a hack to quickly replace it with your own table names

Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C

I work as a Microsoft trainer and consultant, specialising in Power BI and Power Query.
www.excelwithallison.com

Hola @AllisonKennedy ,


2: ¿Cuál es el tipo de datos de FACT_PYMTS[Fecha] ? Su DAX Indica que es texto, en cuyo caso no puede utilizar < "Marzo 2020" por lo que necesita cambiar eso a < DATE(2020, 03, 01) - Ya lo cambio a Fecha, ¿debo usar < DATE(2020, 03, 01) ?
3: ¿Cuál es el tipo de datos para los tipos de pago regulares y no regulares y qué tipo de gráfico está utilizando? - El tipo de datos de mis pagos regulares y no regulares es TEXTO. Y sólo estoy usando un gráfico de barras 🙂

@icdns sí, ya que es tipo de datos Date, tendrá que comparar con una fecha, así que intente < DATE(2020, 03, 01) y debería tener más éxito. 🙂

Please @mention me in your reply if you want a response.

Copying DAX from this post? Click here for a hack to quickly replace it with your own table names

Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C

I work as a Microsoft trainer and consultant, specialising in Power BI and Power Query.
www.excelwithallison.com

Hola @AllisonKennedy ,

trató de usar < DATE(2020,03,01) pero todavía estoy recibiendo un error 😞

icdns_0-1599469129406.png

¿Tiene algún valor de fecha NULL? Es posible que deba agregar un cheque para IF(ISBLANK([Date]),

Please @mention me in your reply if you want a response.

Copying DAX from this post? Click here for a hack to quickly replace it with your own table names

Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C

I work as a Microsoft trainer and consultant, specialising in Power BI and Power Query.
www.excelwithallison.com

Hola @amitchandak

No hay valores nulos en mi conjunto de datos. Huhu 😞 pero el error persiste. 😞

¿Está utilizando la importación o la consulta directa? ¿Ha intentado utilizar SELECTEDVALUE( ) alrededor del campo de fecha?

Please @mention me in your reply if you want a response.

Copying DAX from this post? Click here for a hack to quickly replace it with your own table names

Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C

I work as a Microsoft trainer and consultant, specialising in Power BI and Power Query.
www.excelwithallison.com

Hola,

Helpful resources

Announcements
PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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