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.
Necesitaré su apoyo para mejorar el rendimiento de la siguiente fórmula de medida. Esto está tardando demasiado tiempo en ejecutarse.
RealEqHours = CALCULAR (
SUMX ( SelfService_Plan_DailyPlanHour, IF(SelfService_Plan_DailyPlanHour[DailyPlanStatusId]=1,0,
IF(SelfService_Plan_DailyPlanHour[DailyPlanStatusId]=2,SelfService_Plan_DailyPlanHour[ActualStdHours],
if(SelfService_Plan_DailyPlanHour[DailyPlanStatusId]=3,SelfService_Plan_DailyPlanHour[ApprovedStdHours],SelfService_Plan_DailyPlanHour[ApprovedStdHours]))))
FILTRO ( SelfService_Plan_DailyPlanHour,
SelfService_Plan_DailyPlanHour[IsActive_Hour]
&&SelfService_Plan_DailyPlanHour[IsLatest]
&&SelfService_Plan_DailyPlanHour[ResourceTypeDescription]="Equipo"
&& (SelfService_Plan_DailyPlanHour[DailyPlanStatusDescription]="Aprobado" || SelfService_Plan_DailyPlanHour[DailyPlanStatusDescription]="Esperando aprobación")
&& RELACIONADO(SelfService_Control_CostItem[Is_terminal])
&&SelfService_Plan_DailyPlanHour[ProjectId]=RELATED(SelfService_Core_Project[Project_id])
), USERELATIONSHIP(SelfService_Plan_DailyPlanHour[ProjectIdEquipDisplay], InEightProjEquipmentStagingTable[ProjectIdEquipmentDisplay]))
Solved! Go to Solution.
No @jesly_ajin,
Se pueden definir variables, he modificado Dax de esta forma, puede agregarlo a su archivo PBIX para ver el tiempo empleado:
ActualEqHours =
var _1=
SWITCH(
TRUE(),
SelfService_Plan_DailyPlanHour[DailyPlanStatusId]=1,0,
SelfService_Plan_DailyPlanHour[DailyPlanStatusId]=2,SelfService_Plan_DailyPlanHour[ActualStdHours],
SelfService_Plan_DailyPlanHour[DailyPlanStatusId]=3,SelfService_Plan_DailyPlanHour[ApprovedStdHours],
SelfService_Plan_DailyPlanHour[ApprovedStdHours])
var _2=SUMX(SelfService_Plan_DailyPlanHour,_1)
return
CALCULATE ( _2,
FILTER ( SelfService_Plan_DailyPlanHour,
SelfService_Plan_DailyPlanHour[IsActive_Hour]
&& SelfService_Plan_DailyPlanHour[IsLatest]
&& SelfService_Plan_DailyPlanHour[ResourceTypeDescription]="Equipment"
&& (SelfService_Plan_DailyPlanHour[DailyPlanStatusDescription]="Approved" || SelfService_Plan_DailyPlanHour[DailyPlanStatusDescription]="Awaiting Approval")
&& RELATED(SelfService_Control_CostItem[Is_terminal])
&& SelfService_Plan_DailyPlanHour[ProjectId]=RELATED(SelfService_Core_Project[Project_id])
),USERELATIONSHIP(SelfService_Plan_DailyPlanHour[ProjectIdEquipDisplay], InEightProjEquipmentStagingTable[ProjectIdEquipmentDisplay]))
Aquí están los documentos relacionados de optimización de la función Dax, espero que sea útil para usted:
https://maqsoftware.com/expertise/powerbi/dax-best-practices
https://community.powerbi.com/t5/Desktop/DAX-optimization/td-p/946984
https://docs.microsoft.com/en-us/power-bi/guidance/power-bi-optimization
Saludos
Liu Yang
Si este post ayuda, entonces considere Aceptarlo como la solución para ayudar a los otros miembros a encontrarlo más rápidamente.
No @jesly_ajin,
Se pueden definir variables, he modificado Dax de esta forma, puede agregarlo a su archivo PBIX para ver el tiempo empleado:
ActualEqHours =
var _1=
SWITCH(
TRUE(),
SelfService_Plan_DailyPlanHour[DailyPlanStatusId]=1,0,
SelfService_Plan_DailyPlanHour[DailyPlanStatusId]=2,SelfService_Plan_DailyPlanHour[ActualStdHours],
SelfService_Plan_DailyPlanHour[DailyPlanStatusId]=3,SelfService_Plan_DailyPlanHour[ApprovedStdHours],
SelfService_Plan_DailyPlanHour[ApprovedStdHours])
var _2=SUMX(SelfService_Plan_DailyPlanHour,_1)
return
CALCULATE ( _2,
FILTER ( SelfService_Plan_DailyPlanHour,
SelfService_Plan_DailyPlanHour[IsActive_Hour]
&& SelfService_Plan_DailyPlanHour[IsLatest]
&& SelfService_Plan_DailyPlanHour[ResourceTypeDescription]="Equipment"
&& (SelfService_Plan_DailyPlanHour[DailyPlanStatusDescription]="Approved" || SelfService_Plan_DailyPlanHour[DailyPlanStatusDescription]="Awaiting Approval")
&& RELATED(SelfService_Control_CostItem[Is_terminal])
&& SelfService_Plan_DailyPlanHour[ProjectId]=RELATED(SelfService_Core_Project[Project_id])
),USERELATIONSHIP(SelfService_Plan_DailyPlanHour[ProjectIdEquipDisplay], InEightProjEquipmentStagingTable[ProjectIdEquipmentDisplay]))
Aquí están los documentos relacionados de optimización de la función Dax, espero que sea útil para usted:
https://maqsoftware.com/expertise/powerbi/dax-best-practices
https://community.powerbi.com/t5/Desktop/DAX-optimization/td-p/946984
https://docs.microsoft.com/en-us/power-bi/guidance/power-bi-optimization
Saludos
Liu Yang
Si este post ayuda, entonces considere Aceptarlo como la solución para ayudar a los otros miembros a encontrarlo más rápidamente.
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 |