|

Display the status of DocRead reading tasks

Display the status of DocRead reading tasks

I'm currently trying to learn the basics of Power BI to try and replicate some of my existing reports. I figured I would learn faster by trying help our customers making the most out of DocRead rather than following a set training course covering information I don't need to know. 

My end goal is to use Power BI to generate custom reports for our DocRead compliance tool. DocRead stores all of its data in a SQL database and has views that have been specifically created for reporting. However, step one is for me to learn how to replicate the existing reports. 

The current data structure

In the DocRead database there are two fields:

  1. The Status field. This is a text field and can either be "assigned" or "completed" and
  2. the Task overdue field. This is a boolean field which is calculated from the due date of the task. It can either be "True" (i.e. overdue because the due date was in the past) or "False" (because the due date had not arrived). 

Are your policies read on time and by the right people?

DocRead makes compliance simple

My requirement

I wanted to create a new field in my database table to aggregate the values from these two fields to provide a single overall status.

The logic goes as follows:

If the DocRead task status was "completed", then the final result needed to be "completed" (comparing to due dates is irrelevant because the task is completed).

For the assigned tasks, there were 2 possibilities. Either 

  1. the due date for the compliance task was past, so the task was "Overdue", or 
  2. the due date was in the future, so the task was "Assigned"

The solution

I knew I needed to use 2 nested IF statements, but the second element was a Boolean field (showing TRUE/FALSE) After many failed attempts to get the IF statement correct, I realised that because the Boolean value was already giving a TRUE/FALSE answer, the answer was simpler than I thought.

= Table.AddColumn(Readership_vwTaskInfo, "RealStatus", each if [Status] = "Completed" then "Completed" else if [Overdue] then "Overdue" else "Assigned")

I've broken this down below:

Element in formula

What it does

Table.AddColumn(Readership_vwTaskInfo, "RealStatus", 

This element adds a column for my new field called "RealStatus"

each if [Status] = "Completed" then "Completed"

This looks for the value in the Status field for each row of my database table independently. If the Status value is "Completed" then it adds the value "Completed" into my new Real Status field

else if [Overdue] then "Overdue"

As the [Overdue] field is already a boolean value and returns either True or False, it doesn't need to be compared to another value to work out whether the answer is True or false, the IF statement can work already. IF the [Overdue] field is true (i.e. it has been flagged as Yes/Overdue in the database) then add the value "Overdue" into the "RealStatus" field

else "Assigned"

The final part of the IF statement describes what to do if neither of the first criteria are met. In my case, I want to give the task an "Assigned" RealStatus.

I was therefore able to create one new field showing whether the compliance tasks sent by DocRead were Assigned, Overdue or Completed and use this information in my Power BI pie chart.

See what DocRead can do for you

Book a custom demo with one of our experts now to discuss your specific requirements and find out how DocRead can help you stay compliant

Similar Posts

  • | |

    RN29: DocRead and DocSurvey for SharePoint V4.0 (4.0.21142.7).

    DocRead & DocSurvey V4.0Note: The information in this post relates to DocRead for on-premises SharePoint only. 21st of May 2021  – Build 4.0.21142.7 New Functionality and what has changed in this version of DocReadDocRead document context menu options (Reading Requirements and DocRead Settings) now fully working in SharePoint 2019DocRead document context menu options now available in the…

  • |

    The Shortcut in SharePoint Policy Management

    The Shortcut in Policy Management with your version of SharePointWorking within policy management or compliance teams in large or complex organizations can bring with it many challenges. Not least of which is making sure your business keeps pace with the ever-changing policy, regulation and compliance landscape. Where do you feel the pain?Take any one of…

  • | | |

    Create a Reporting Hierarchy in Power BI

    Create a Reporting Hierarchy in Power BI Creating hierarchies in your Power BI data provides opportunities to further enhance reporting capabilities. For instance, Power BI will automatically calculate a date hierarchy. This will allow you to drill down from annual data, to quarters, months and days. You can also create bespoke hierarchies within your data to…

  • DocRead Architecture Design

    DocRead Architecture Design DocRead for SharePoint is the only policy management software that integrates straight into SharePoint and allows compliance professionals to distribute and track their policies and procedures. DocRead can distribute, process, track and report on reading tasks for 1000’s of end users at a time. To cope with volume an enterprise architecture was designed and implemented….

  • |

    Preparing for the next big compliance threat

    Preparing for the next big compliance threatAs a compliance manager, you play a critical role in ensuring that your organization is prepared for any and all compliance threats that come its way. With the rapid pace of change in the business world and the ever-evolving landscape of regulatory requirements, staying ahead of the curve can…

  • | |

    How to configure a yearly reminder on a SharePoint document

    How to configure a yearly reminder on a SharePoint documentSharePoint Information Management Policies are very useful for automatically performing actions on a document at some point in the future.For example, your organization may conform to ISO 9001 standards which require that documentation should be regularly reviewed and refreshed. It’s also extremely good practice to clean,…