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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

very slow performance

i am facing performance issue in the above dax in live connection. can anyone modify the formulae to make the dax efficient.if i don't add customer number and Item name to the table then dax is working perfectly. but when i try to put the customer number and Item in the table it is not loading.

 

previousSCDate = 
Var MaxPlanDate = CALCULATE(Max(date[CreatedDate]),GROUPBY(Cus,[Cus_Number]),GROUPBY('item',[itemname]))
Return
  CALCULATE(
    MAX(date[CreatedDate] )
   ,date[CreatedDate] < MaxPlanDate,GROUPBY(Cus,[Cus_Number]),GROUPBY('item',[itemname])
)   

 

 

1 REPLY 1
v-lili6-msft
Community Support
Community Support

hi, @Anonymous 

If you could filter some data and then try it again?

or if you just use this formula to create a measure

Measure 3 = CALCULATE(MAX('date'[CreatedDate]),FILTER(ALL('date'),'date'[CreatedDate]<MAX('date'[CreatedDate])))

If possible, could you share some sample data and your expected output.

 

Best Regards,

Lin

 

Community Support Team _ Lin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.