The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Solved! Go to Solution.
Hi,
try using a variable.
Order_Count_Optimized =
VAR OrdersCount =
CALCULATE (
COUNT(Orders[Id]),
USERELATIONSHIP ( Products[Inspection_EndDate], 'Dim-Date'[Date] ),
USERELATIONSHIP(UserProfiles[AccountId__UID], Operators[AccountId__UID])
)
RETURN
OrdersCount
Hi @hoosha_11 ,
You can try storing intermediate results in variables. This approach reduces the number of calculations and thus improves performance. You can modify your formula like below:
Order_Count =
VAR InspectionEndDate =
CALCULATE (
COUNT(Orders[Id]),
USERELATIONSHIP ( Products[Inspection_EndDate], 'Dim-Date'[Date] )
)
VAR AccountIdRelationship =
CALCULATE (
COUNT(Orders[Id]),
USERELATIONSHIP(UserProfiles[AccountId__UID], Operators[AccountId__UID])
)
RETURN
InspectionEndDate + AccountIdRelationship
Also i tried formula provided by @Shravan133 . You can refer to below result:
Best Regards,
Adamk Kong
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @hoosha_11 ,
You can try storing intermediate results in variables. This approach reduces the number of calculations and thus improves performance. You can modify your formula like below:
Order_Count =
VAR InspectionEndDate =
CALCULATE (
COUNT(Orders[Id]),
USERELATIONSHIP ( Products[Inspection_EndDate], 'Dim-Date'[Date] )
)
VAR AccountIdRelationship =
CALCULATE (
COUNT(Orders[Id]),
USERELATIONSHIP(UserProfiles[AccountId__UID], Operators[AccountId__UID])
)
RETURN
InspectionEndDate + AccountIdRelationship
Also i tried formula provided by @Shravan133 . You can refer to below result:
Best Regards,
Adamk Kong
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi,
try using a variable.
Order_Count_Optimized =
VAR OrdersCount =
CALCULATE (
COUNT(Orders[Id]),
USERELATIONSHIP ( Products[Inspection_EndDate], 'Dim-Date'[Date] ),
USERELATIONSHIP(UserProfiles[AccountId__UID], Operators[AccountId__UID])
)
RETURN
OrdersCount
User | Count |
---|---|
74 | |
70 | |
39 | |
30 | |
28 |
User | Count |
---|---|
104 | |
95 | |
51 | |
48 | |
46 |