Bucketing by perf_date (played off and future)

Heyo,

Hoping someone can’t point me in the right direction. I’ve got a custom cube with our daily sales report data in it. I would like bucket sales totals into events that have played off and those that have not. I’m hung up on how to retrieve today’s date and use compare to the perf_date. Then bucket by those criteria. In SQL I would do something like

              SUM

              (CASE

                     WHEN perf_dt < GETDATE() THEN tickets

              END) as played_off,

              SUM

              (CASE

                     WHEN perf_dt >= GETDATE() THEN tickets

              END) as future,

              SUM(a.cyo_tix)

 

Ultimate goal would be this output

 

Single Tix

CYO Tix

Sub Tix

Total Tix

Played Off

545

98

1200

1843

Future

1248

894

3594

5736

Parents Reply Children
No Data