Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
Anonymous
Not 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

img_1.PNG

  • Rest Day Data

img_2.PNG

Basically, I want to know how many people submitted for the day and how many are on rest day.

 

img_3.PNG

 

I was able to create the report but having issues to adding the Out of Office & No Entry status since they are not really available "Daily Form Responses" table.

 

Is there a way to create an entry if the data for a person is missing? My apologies if I cant explain it clearly. But I really want to have a table that has all of the data that shows if they don't have an entry for the day or if they are on out of office status. 

1 ACCEPTED SOLUTION
MFelix
Super User
Super 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.

out_of_office.png

 

 


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português





View solution in original post

2 REPLIES 2
mahoneypat
Microsoft Employee
Microsoft Employee

Here is one way to approach this:

 

1. Add a Date column to your Rest Day data (if not there already)

2. Append it to your Daily Form Responses table

3. Sort by Employee Name and Fill down on that column (if that second table really doesn't have name in it)

4. Load the data and make a matrix visual with Employee on the rows, Date on the columns

5. Make a measure like this - Status = IF(ISBLANK(MIN(Daily Form Responses[Status]), "No Entry", MIN(Daily Form Responses[Status]))

 

If this works for you, please mark it as solution.  Kudos are appreciated too.  Please let me know if not.

Regards,

Pat

 





Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


MFelix
Super User
Super 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.

out_of_office.png

 

 


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português





Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Top Solution Authors