Forum Discussion

karimk's avatar
karimk
Icon for Helper III rankHelper III
8 years ago
Solved

Timeline help: hotel room booking system

Hi! I have a tough one. Is it possible in any way to make a timeline-like chart to show how my building are occupied during the year? Considerations: -One axis shows months and weeks -Another axis...
  • MFelix's avatar
    MFelix
    8 years ago

    Hi karimk,

     

    Ansewring on question 1 and on the problem you have, I have made an error on the formula  were  we put Calendar[Week] should be [Week_Year] below is the corrected measure I have made the copy before finalizing my formula, sorry

     

    Ocupation_Dates = 
    VAR Week_number =
        MAX ( 'Calendar'[Week_Year] )
    RETURN
        CALCULATE (
            MIN ( occupation[PRODUCTION] ),
            occupation[Start_Week] <= Week_number,
            occupation[End_week] >= Week_number
        )

     

    So this solves your issue of blank values in matrix and respond to your first question the Week_Year column is how I define the start and stop on the matrix values

     

    Thougt process:

    The measure are based on context so when you add the columns (dates) and the Rows (buildings) all the calculations will be made with the "crossing" of the information of rows and columns.

     

    The variable Week number makes a context validation within the matrix and returns that column week number by year

    On the calculate I choose the Production value at the Year/month/week choosen and at the building. So based on that what the formula does is to compare the Week Number on the Column and check if the Start Week is higher than that and the End week is lower so based on that returns the values of the Production.

     

    Regards,

    MFelix

  • MFelix's avatar
    MFelix
    8 years ago

    Hi karimk,

     

    You can do this with image URL however the part of the name will not be available URL images can only be displayed with URL and not composed formulas.

     

    Regards,

    MFelix