Forum Discussion

akhoury's avatar
akhoury
Icon for Helper I rankHelper I
6 years ago
Solved

SUMMARIZE function and SAMEPERIODLASTYEAR returning BLANK

Dear PBI community,   Im having an issue with the Summarize function, especially when applying SAMEPERIODLASTYEAR.   The model I have is: -oos_sales Table which has sales transactions by product...
  • sandeepsingh's avatar
    6 years ago

    HI, I see what you are trying to achieve. I would recommend to use addcolumns along with summarize, for additional columns, i.e., sales & previous year sales. 

    So the syntax should be Addcolumns ( Summarize ( Sales , Sales [Item] ), "Current Year Sales" , [Current Year Sales Measure] , "Prev Year Sales" , [Prev Year Sales Measure] )