Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Emilien_Granger
Frequent Visitor

Showing Stay Night per day with only start date | Datasource Modeling in hospitality

Hello everyone, I am trying to figure out the best way to optimize my model importation while keeping all the data I need for a visual. 

 

Here is my case, I am working with hospitality data where there is a stay "start date" and  "end date". What I want to show to make it easy is when a stay has a start date on 07/28/2022 and 2 nights stay :
07/28/2022 : 1 night
07/29/2022 : 1 night

 

While I have been able to do this if my table has a granularity by night, it creates too much rows to import so I would like to : import all my rows with a granularity per "Stay" (versus per Night) and kind of pivot my table after the importation in Power BI to be able to show on a graph the data I want to display.

 

Here is what my data look like : 

 

Table I want to import

Start of stayEnd of stayAmountKEY_ETABClient IDNights
4/22/20194/25/201999Hotel Name | Generic Room143973
4/24/20194/12/201940Hotel Name | Generic Room144012

 

Table I want to avoid

Stay DateAmountRoom nameClient Id
4/22/201933Hotel Name | Generic Room14397
4/23/201933Hotel Name | Generic Room14397
4/24/201933Hotel Name | Generic Room14397
4/24/201920Hotel Name | Private Room14401
4/25/201920Hotel Name | Private Room14401

 

 

To give you a basic idea, here is what I want to do

Emilien_Granger_0-1665492052207.png

 

Thanks a lot for your help everyone, hope someone can help me sort this out

1 REPLY 1
v-yanjiang-msft
Community Support
Community Support

Hi @Emilien_Granger ,

Sorry I'm not very clear, do you want to create the column chart with the "Table I want to Import" table and create the line chart with the "Table I want to avoid" table? If so, do you have two tables autually?

Best Regards,
Community Support Team _ kalyj

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.