Forum Discussion
Ryukatan10
4 years agoRegular Visitor
Considering Specific Days Between Two Dates
Hello everyone, I'm stuck with this issue and don't know how to solve it. I have a database that show several rows like this one: Flight Acft Mon Tue Wed Thu Fri Sat Sun Begin Ope...
- 4 years ago
Ryukatan10
Here is a sample file with the solution https://www.dropbox.com/t/08giOHP4Wl2Oy6Q7You need first to unpivote the weekday columns in the flights table:
Rename the "Value" column
Delete the "Attribute" column
Filter out Zero values
Create the relationship with the Date table (Make sure the Weekday numbering system is the same in both tables). In your real data the relationship will be Many to Many
Create the table visual (Flight > from Flights table and Date > from Date table)
Create the Filter measure that will filter only the existing Dates between "Begining" and "End"
Flight Dates = COUNTROWS ( FILTER ( 'Date', 'Date'[Date] >= MAX( Flights[Begin Operation] ) && 'Date'[Date] <= MAX ( Flights[End Operation] ) ) )Place the measure in the Filter Pane and select "Is not blank" then apply
tamerj1
Community Champion
4 years agoHi Ryukatan10
can you share sample data if the 2nd table?