Forum Discussion

DangerHog's avatar
DangerHog
Frequent Visitor
8 years ago
Solved

create new table from begin date, end date, transactionuid

I'm not sure if this is in the correct Location...

 

I have a table of reservation data with a column for "reservation #", "begin date", "end date", and "revenue" (plus some other misc. columns).  The reservations often begin in one month and end in another month.  I need to roll up revenue per month so I want to create a new table for that contains a row for each day of the reservation and a new column for the average revenue per day.  The new table should let me slice and dice data by weekday, month, and whatever else I need. 

 

What is the easiest or best way to create the new table?

 

Thanks for your help!

 

-- Example Data --

 

Reservation#  ,  Beting Date  ,  End Date  ,  Revenue

9873459  ,  02/28/18  ,  03/03/18  ,  $14,512

2938279  ,  03/01/18  ,  03/06/18  ,  $3,235

 

 

-- Example Result Table --

Reservation#  ,  Beting Date  ,  End Date  ,  Revenue  ,  Avg. REvenue

9873459  ,  02/28/18  ,  03/03/18  ,  $14,512  ,  $3628

9873459  ,  02/28/18  ,  03/03/18  ,  $14,512  ,  $3628

9873459  ,  02/28/18  ,  03/03/18  ,  $14,512  ,  $3628

9873459  ,  02/28/18  ,  03/03/18  ,  $14,512  ,  $3628

2938279  ,  03/01/18  ,  03/06/18  ,  $3,235  ,  $539

2938279  ,  03/01/18  ,  03/06/18  ,  $3,235  ,  $539

2938279  ,  03/01/18  ,  03/06/18  ,  $3,235  ,  $539

2938279  ,  03/01/18  ,  03/06/18  ,  $3,235  ,  $539

2938279  ,  03/01/18  ,  03/06/18  ,  $3,235  ,  $539

2938279  ,  03/01/18  ,  03/06/18  ,  $3,235  ,  $539

 

10 Replies

    • DangerHog's avatar
      DangerHog
      Frequent Visitor

      Thanks for the reply.


      I think I may just be too big of a newb to understand how that helps me.

       

      1) what are the best online classes for learning DAX and how it works in Power BI?

      2) Going back to the most basic concept of my problem.  How would I take a table of begin dates, end dates and Uids and create a new table that would have a column of dates and a column of UIDs where each UID is repeated for each date in the range between begin and end.