cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper III
Helper III

Error de cálculo de Mdxscript (Modelo)

Hola

Estoy recibiendo un error

suvechha_0-1597394307532.png


para las medidas:

SDUserId - CALCULATE(
VALUES(SDUser[USERID]),
USERELATIONSHIP(WorkOrderStates[OWNERID], SDUser[USERID])
)



Tengo una consulta sql como abajo :

SELECCIONE el top 10 "wo"." WORKORDERID" COMO "ID de solicitud",
"aau"." FIRST_NAME" COMO "Requester",
"ti"." FIRST_NAME" COMO "Técnico",
"wo"." CREATEDTIME" COMO "Tiempo creado"
DESDE "WorkOrder" "wo" IZQUIERDA UNIRSE "SDUser" "sdu"
EN "wo"." REQUESTERID"-"sdu"." USERID"
IZQUIERDA UNIRSE a "AaaUser" "aau" EN "sdu"." USERID""aau"." USER_ID"
IZQUIERDA UNIRSE a "WorkOrderStates" "wos" EN "wo"." WORKORDERID"-"wos"." WORKORDERID"
IZQUIERDA UNIRSE a "SDUser" "td" EN "wos"." OWNERID""td"." USERID"
IZQUIERDA UNIRSE a "AaaUser" "ti" EN "td"." USERID""ti"." USER_ID"

Para obtener el valor Technicial , tengo que crear userrelationship() pero no funciona.
Por favor, ay den asistencia.

Gracias

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Super User IX
Super User IX

Re: Error de cálculo de Mdxscript (modelo)

@suvechha, necesita tener alguna operación como , min , max , count , sum

SDUserId - CALCULATE(
Count(SDUser[USERID]),
USERELATIONSHIP(WorkOrderStates[OWNERID], SDUser[USERID])
)

para obtener el top 10, usar topn o rango

Para rango Consulte estos enlaces
https://radacad.com/how-to-use-rankx-in-dax-part-2-of-3-calculated-measures
https://radacad.com/how-to-use-rankx-in-dax-part-1-of-3-calculated-columns
https://radacad.com/how-to-use-rankx-in-dax-part-3-of-3-the-finale
https://community.powerbi.com/t5/Community-Blog/Dynamic-TopN-made-easy-with-What-If-Parameter/ba-p/3...



Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
Dashboard of My Blogs !! YouTube Channel !! Connect on Linkedin

Proud to be a Super User!

View solution in original post

2 REPLIES 2
Highlighted
Super User IX
Super User IX

Re: Error de cálculo de Mdxscript (modelo)

@suvechha, necesita tener alguna operación como , min , max , count , sum

SDUserId - CALCULATE(
Count(SDUser[USERID]),
USERELATIONSHIP(WorkOrderStates[OWNERID], SDUser[USERID])
)

para obtener el top 10, usar topn o rango

Para rango Consulte estos enlaces
https://radacad.com/how-to-use-rankx-in-dax-part-2-of-3-calculated-measures
https://radacad.com/how-to-use-rankx-in-dax-part-1-of-3-calculated-columns
https://radacad.com/how-to-use-rankx-in-dax-part-3-of-3-the-finale
https://community.powerbi.com/t5/Community-Blog/Dynamic-TopN-made-easy-with-What-If-Parameter/ba-p/3...



Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
Dashboard of My Blogs !! YouTube Channel !! Connect on Linkedin

Proud to be a Super User!

View solution in original post

Highlighted
Community Support
Community Support

Re: Error de cálculo de Mdxscript (modelo)

Hola , @suvechha

Intente utilizar FIRSTNONBLANK(SDUser[USERID], 1) en lugar de SDUser[USERID].

Saludos
Equipo de soporte de la comunidad _ Eason

Helpful resources

Announcements
Ignite

Microsoft Ignite

This will be a conference that you do not want to miss!

Get Ready for Power BI Dev Camp

Get Ready for Power BI Dev Camp

Don't miss the Power BI Dev Camp this week!

August Community Highlights

Check out a full recap of the month!

August 2020 CYST Challenge

Check out the winners of the recent 'Can You Solve These?' community challenge!

Experience what’s next for Power BI

Join us for an in-depth look at the new Power BI features and capabilities at the free Microsoft Business Applications Launch Event.

Top Solution Authors