- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Date filter by departure year
I've got a report where it is counting all reservation days for each year by (arrival_date) i need to make sure the visual only counts reservation days that are in the same year.
Example: Reservation made on 10/1/22, the customer extends their stay into the next year (1/14/23) it doesnt count those 14 days in 2023 since the arrival date is 10/1/22. I need to filter the report so it only counts reservations that have the same year for arrival and departure.
Hope that makes sense. Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Create a calculated column formula
Check = 1*(year(Data[Arrival_date])=year(Data[reservation_date]))
Write this measure
Measure = countrows(filter(Data,Data[Check]=1))
Hope this helps.
Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks, i tried the above but i must be missing something, "Data" isnt a valid table. These are names of the columns i need to filter by on the database:
transientreservations.arrival
transientreservations.departure
Need to filter my visual so its only showing data that is same year for arrival and departure. I want to also be able to see current year. The above calculated column and measure dont seem to work or i'm doing something wrong. I may be creating them wrong. Am i supposed to then filter the report by the measure? I'm a novice when it comes to PowerBi, thanks again.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Data is the name of the Table. In my measure, replace arrival_date with transientreservations.arrival and reservation date with transientreservations.departure
Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
Helpful resources
Join us at the Microsoft Fabric Community Conference
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Microsoft Fabric Community Conference 2025
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
Subject | Author | Posted | |
---|---|---|---|
07-12-2024 05:52 AM | |||
12-22-2023 05:43 AM | |||
07-22-2024 11:52 AM | |||
02-19-2024 02:30 AM | |||
07-10-2024 05:40 AM |
User | Count |
---|---|
113 | |
76 | |
55 | |
54 | |
43 |
User | Count |
---|---|
183 | |
120 | |
80 | |
67 | |
57 |