Forum Discussion
Timeline help: hotel room booking system
- 9 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
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
And now an evolution of the solution you gave me:
Is it possible to also give blank spaces of time (with no production value) a "value"? My goal is to filter a specific date and have it show me all the blank spaces, so I can be sure where I can alocate a production.
- MFelix8 years ago
Super User
Not sure if this is what you need but if you change this part of the formula you will get a "value" instead of blank value:
Occupation with symbol: = SWITCH ( TRUE (), occupation[Ocupation_Dates] = BLANK (), "VACANT", VALUES ( occupation[GÊNERO] ) = "Dramaturgia Diária", occupation[Ocupation_Dates] & UNICHAR ( 9650 ), VALUES ( occupation[GÊNERO] ) = "Dramaturgia Semanal", occupation[Ocupation_Dates] & UNICHAR ( 9724 ), VALUES ( occupation[GÊNERO] ) = "Escritorial", occupation[Ocupation_Dates] & UNICHAR ( 9670 ), VALUES ( occupation[GÊNERO] ) = "Variedades Diária", occupation[Ocupation_Dates] & UNICHAR ( 9677 ), VALUES ( occupation[GÊNERO] ) = "Variedades Noite", occupation[Ocupation_Dates] & UNICHAR ( 9608 ), occupation[Ocupation_Dates] )Regards,
MFelix