Forum Discussion
Timeline help: hotel room booking system
- 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
Sure I just placed a number to facilitate you need to adjust the formula to your request.
Do you have a sample of the values you wish to include?
I can do a quick change to the formula.
Regards,
MFelix
Hi,
The Dropbox link below has an Excel file with a sample database.
https://www.dropbox.com/s/j3c0y69gebrpwzz/TIMELINE%20TEST3.xlsx?dl=0
Basically I would like to put a colored unicode next to each "PRODUCTION" name on the timeline, based on it´s "GÊNERO".
The GÊNERO-color relation is on the "UNICODE REF" sheet.
The unicode image would have to be as neutral as possible (a rectangule, for example).
Is this possible?
Thank you so much for still helping.
- MFelix8 years ago
Super User
Hi karimk
Try this measure, again you can choose the unicode character on link.
Occupation with symbol: = SWITCH ( TRUE (), occupation[Ocupation_Dates] = BLANK (), BLANK (), 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
- karimk8 years ago
Helper III
Hi. Thanks a lot.
I can´t get colored unicodes. It seems so because I have Windows 7. I´m looking into other options.
Is it possible to do the same kind of measure you did, but instead of unicode, an image from a URL?
- karimk8 years ago
Helper III
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