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

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now

Reply
Steven1809
Regular Visitor

Show Missing Values in Matrix as Text

Hello,
I'm creating a dashboard for monitoring whether documents are up to date in our database (web based, linked via API) and can't figure out a way to show missing data as missing.

 

Data:

Rows that include document name, parent, as of date, and a document tag (ex: "ADV"). There can be multiple versions of the same document so I just use the one with the most recent as of date. There are also many rows in this data that aren't relevant for monitoring.

To conditionally format the data I use a column in power query to take the amount of days since the document as of date and assign good/warning/late depending on the type of document. In combination with this I have a simple pie chart that shows the % in good/warning/late.

Some documents may not be in the database, or not tagged appropriately and leading to blank rows in the matrix and an inaccurate representation in the pie chart. 

 

Is there a way to assign a "missing" value to these rows if no document with the appropriate tag appears? 

Steven1809_0-1695321006277.png

Steven1809_1-1695321035469.png

 

8 REPLIES 8
HarishKM
Impactful Individual
Impactful Individual

@Steven1809 Hello ,
You can update conditional column as you have 3 values already like Good, Late and Warning so you can add not available when you do not have values or blanks or you desired output.
Kindly refer below image.

HarishKM_0-1695379454626.png



Thanks
Harish M

 

The issue with this method is it wouldn't differentiate by which parentID and document type. I create the good/late/warning based on a document type and days since the as of date. I need a way to basically check that the document has never appeared in the data feed for each unique parentID.

 

AmiraBedh
Most Valuable Professional
Most Valuable Professional

Can you provide your input ? There are several ways for that 🙂


Proud to be a Power BI Super User !

Microsoft Community : https://docs.microsoft.com/en-us/users/AmiraBedhiafi
Linkedin : https://www.linkedin.com/in/amira-bedhiafi/
StackOverflow : https://stackoverflow.com/users/9517769/amira-bedhiafi
C-Sharp Corner : https://www.c-sharpcorner.com/members/amira-bedhiafi
Power BI Community :https://community.powerbi.com/t5/user/viewprofilepage/user-id/332696

Do you mean the file itself? Or what a row in power query looks like?

 

If you mean power query, the format is at follows:

parentID/documentType/Document Versions.asOf/DateDiff (today-as of date)/OverDue (assigned depending on document type and date diff)

 

Matrix:

Steven1809_0-1695322663403.png

I use first OverDue so that I only show the most recent document version

AmiraBedh
Most Valuable Professional
Most Valuable Professional

The file itself please, help us to help you.


Proud to be a Power BI Super User !

Microsoft Community : https://docs.microsoft.com/en-us/users/AmiraBedhiafi
Linkedin : https://www.linkedin.com/in/amira-bedhiafi/
StackOverflow : https://stackoverflow.com/users/9517769/amira-bedhiafi
C-Sharp Corner : https://www.c-sharpcorner.com/members/amira-bedhiafi
Power BI Community :https://community.powerbi.com/t5/user/viewprofilepage/user-id/332696

I'll have to recreate this and get back to you with it tomorrow. The file I'm working in includes sensitive information. 

AmiraBedh
Most Valuable Professional
Most Valuable Professional

I will be waiting 🙂


Proud to be a Power BI Super User !

Microsoft Community : https://docs.microsoft.com/en-us/users/AmiraBedhiafi
Linkedin : https://www.linkedin.com/in/amira-bedhiafi/
StackOverflow : https://stackoverflow.com/users/9517769/amira-bedhiafi
C-Sharp Corner : https://www.c-sharpcorner.com/members/amira-bedhiafi
Power BI Community :https://community.powerbi.com/t5/user/viewprofilepage/user-id/332696

Sorry for the delay. I don't have an option to attach files in this forum for some reason so here is some additional information

 

excel input:

parentIDdocumentTypesDocument Versions.asOf
Parent1Conference Call9/1/2023
Parent2Update:quarterly6/29/2023
Parent3Update:quarterly3/30/2023
Parent4Attribution9/29/2022
Parent2Conference Call8/31/2023
Parent1Attribution5/30/2023
Parent3Notes3/13/2023
Parent4ADV12/31/2022
Parent1Factsheet12/31/2022
Parent2DDQ12/31/2022
Parent3Audited Financials12/30/2022
Parent4ADV8/31/2022
Parent2Notes8/30/2023
Parent1Notes8/11/2023
Parent3Update:quarterly6/29/2023
Parent4DDQ4/29/2023
Parent1Update:quarterly3/30/2023
Parent2Notes8/30/2023
Parent3DDQ8/30/2023
Parent4Update:quarterly7/31/2023
Parent2Factsheet6/29/2023
Parent1DDQ8/29/2023
Parent3Notes8/24/2023
Parent4DDQ6/29/2023
Parent1ADV6/29/2023

power query: 

let
Source = Excel.Workbook(File.Contents("Document Tracking Sample.xlsx"), null, true),
Sheet1_Sheet = Source{[Item="Sheet1",Kind="Sheet"]}[Data],
#"Promoted Headers" = Table.PromoteHeaders(Sheet1_Sheet, [PromoteAllScalars=true]),
#"Changed Type" = Table.TransformColumnTypes(#"Promoted Headers",{{"parentID", type text}, {"documentTypes", type text}, {"Document Versions.asOf", type date}}),
#"Added Custom" = Table.AddColumn(#"Changed Type", "Custom", each Duration.Days(Date.From(DateTime.LocalNow())-Date.From([Document Versions.asOf]))),
#"Renamed Columns" = Table.RenameColumns(#"Added Custom",{{"Custom", "DateDiff"}}),
#"Added Custom1" = Table.AddColumn(#"Renamed Columns", "Custom.1", each if [documentTypes] = null then null
else if [documentTypes] = "ADV" and [DateDiff] < 400 then "Good"
else if [documentTypes] = "ADV" and [DateDiff] < 500 then "Warning"
else if [documentTypes] = "ADV" and [DateDiff] >= 500 then "Late"
else if [documentTypes] = "Attribution" and [DateDiff] < 120 then "Good"
else if [documentTypes] = "Attribution" and [DateDiff] < 150 then "Warning"
else if [documentTypes] = "Attribution" and [DateDiff] >= 150 then "Late"
else if [documentTypes] = "DDQ" and [DateDiff] < 400 then "Good"
else if [documentTypes] = "DDQ" and [DateDiff] < 500 then "Warning"
else if [documentTypes] = "DDQ" and [DateDiff] >= 500 then "Late"
else if [documentTypes] = "Update:quarterly" and [DateDiff] < 120 then "Good"
else if [documentTypes] = "Update:quarterly" and [DateDiff] < 150 then "Warning"
else if [documentTypes] = "Update:quarterly" and [DateDiff] >= 150 then "Late"
else if [documentTypes] = "Factsheet" and [DateDiff] < 120 then "Good"
else if [documentTypes] = "Factsheet" and [DateDiff] < 200 and [DateDiff] >=120 then "Warning"
else if [documentTypes] = "Factsheet" and [DateDiff] >= 200 then "Late"
else if [documentTypes] = "Notes" and [DateDiff] < 180 then "Good"
else if [documentTypes] = "Notes" and [DateDiff] <= 250 then "Warning"
else if [documentTypes] = "Notes" and [DateDiff] > 250 then "Late"
else null),
#"Renamed Columns1" = Table.RenameColumns(#"Added Custom1",{{"Custom.1", "OverDue"}}),
#"Sorted Rows" = Table.Buffer(Table.Sort(#"Renamed Columns1",{{"Document Versions.asOf", Order.Descending}}))
in
#"Sorted Rows"

 

 

 

Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

Find out what's new and trending in the Fabric Community.

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

Check out the November 2024 Power BI update to learn about new features.