Forum Discussion

cworkman2015's avatar
cworkman2015
Helper II
5 years ago
Solved

Performance Tune Summarize function to GroupBy Function with Filters

Hello,   I'm running a summarize function that is wrecking my performance - I read that Group By can give me an advantage in this regard but I'm unsure how to use both Group By and Filter. here ...
  • Greg_Deckler's avatar
    5 years ago

    cworkman2015 Well, I doubt that it is the SUMMARIZE technically that is wrecking your performance versus the calculation you are doing for the column you are adding as part of your summarize. You are removing all the context with ALL and thus returning all rows and then you are trying to grap rows between two values. That generally speaks trouble. I am wondering why you are using an ALL there for one. What should be in context is all rows for that store and itemnumber anyway. 

     

    With GROUPBY, you have to do calculations over CURRENTGROUP() which generally means you are using the X aggregation functions, MAXX, SUMX, etc. If you try to MAXX(FILTER(CURRENTGROUP()... you will get an error.

     

    Sample data and expected output might shed some light on a better way of doing things.