Forum Discussion
Anonymous
6 years agoNot applicable
Add data if data is missing
Hello Guys, Can I ask for your help on the report that I'm making. I have 2 tables that I'm working on: Daily Form Responses Rest Day Data Basically, I want to know how many peop...
- 6 years ago
Hi Anonymous ,
Don't know if the tables are as I have made the setup but try the following:
Tables:
- Employees
- Calendar
- Daily Form Responses
- Rest Day
Relationships:
- Employee 1 -> * Daily Form Responses
- Employee 1 -> * Rest Day
- Calendar 1 -> * Daily Form Responses
Add a column with the weekday on the calendar table and on the Rest day, then make the following measure:
Status_Measure = IF ( MAX ( 'Daily Form Responses'[Status] ) = BLANK (); IF ( SELECTEDVALUE ( 'Calendar'[Weekday] ) = SELECTEDVALUE ( 'Rest Day'[Weekday] ); "OUT OF OFFICE"; "NO ENTRY" ); "SUBMITTED" )Now just add a condittional formatting formula:
Condittional formating = SWITCH ( [Status_Measure]; "NO ENTRY"; "RED"; "OUT OF OFFICE"; "YELLOW"; "GREEN" )Result is below and in attach PBIX file.
MFelix
6 years agoSuper User
Hi Anonymous ,
Don't know if the tables are as I have made the setup but try the following:
Tables:
- Employees
- Calendar
- Daily Form Responses
- Rest Day
Relationships:
- Employee 1 -> * Daily Form Responses
- Employee 1 -> * Rest Day
- Calendar 1 -> * Daily Form Responses
Add a column with the weekday on the calendar table and on the Rest day, then make the following measure:
Status_Measure =
IF (
MAX ( 'Daily Form Responses'[Status] ) = BLANK ();
IF (
SELECTEDVALUE ( 'Calendar'[Weekday] ) = SELECTEDVALUE ( 'Rest Day'[Weekday] );
"OUT OF OFFICE";
"NO ENTRY"
);
"SUBMITTED"
)
Now just add a condittional formatting formula:
Condittional formating =
SWITCH (
[Status_Measure];
"NO ENTRY"; "RED";
"OUT OF OFFICE"; "YELLOW";
"GREEN"
)
Result is below and in attach PBIX file.