3 Replies Latest reply on Jun 4, 2018 2:04 PM by Deepak Rai

    LOD expression to compare sales by sub-category to avg by category

    jack.glavosek

      I'm trying to create an LOD expression that gives me the average sales of the sub-categories within a category.  Then, I want to create a calculations that compare the sales by sub-category to the average.

      I'm having trouble with the LOD expression:({fixed Category,[Order Date]:sum(Sales)})

       

      I'm trying to create a table that looks like this:

       

      CategorySub-CategorySalesAverage for CategorySales - Avg
      FurnitureBookcases$20,037$39,298-$19,262
      Chairs$77,242$39,298$37,943
      Furnishings$13,826$39,298-$25,472
      Tables$46,088$39,298$6,790
      Office SuppliesAppliances$15,314$16,864-$1,550
      Art$6,058$16,864-$10,806
      Binders$43,488$16,864$26,624
      Envelopes$3,856$16,864-$13,008
      Fasteners$661$16,864-$16,203
      Labels$2,841$16,864-$14,023
      Paper$14,835$16,864-$2,029
      Storage$50,329$16,864$33,465
      Supplies$14,394$16,864-$2,470
      TechnologyAccessories$25,014$43,820-$18,805
      Copiers$10,850$43,820-$32,970
      Machines$62,023$43,820$18,204
      Phones$77,391$43,820$33,571