Forum Discussion

bitraveldepart's avatar
bitraveldepart
Frequent Visitor
7 years ago
Solved

Incremental Values/ group by Relative week

Hi,     I'd like to see the incremental Pax number from the beginning of the year till now and compare the rate of target. So I have my Pax number for each booking record with date, relative week...
  • HotChilli's avatar
    7 years ago

    Create a summary table, grouping by week and SUM the passengers

    sumtab = SUMMARIZE(TourPassengers, 
         TourPassengers[RelativeWeek],  
         "total Pax", SUM(TourPassengers[Pax]))

    Then add a calculated column for cumulative totals

    CumulPax = CALCULATE ( SUM(sumtab[total Pax]),
        			FILTER (  
        			ALL ( sumtab ),
            		sumtab[RelativeWeek] <= EARLIER ( sumtab[RelativeWeek])))