Yes/No Column in Powerbi

bohon79

New Member
Joined
Jul 2, 2015
Messages
45
Good Morning, this has probally already been ask but cant seem to find it if it has

I have 3 columns
Completion date
Due Date
On Time

Trying to get where it annotates yes or no in the On time column.

1. Annotate Yes if completion date is on or before the Due Date
2. Annotate No if completion date is after the Due Date
3. This is where i am having trouble, Annotate Yes if blank and todays date is after the due date or No if todays date is on or before the due date

I am able to do the conditional column piece but getting stuck on number 3 on how to incorporate it into 1 and 2.

any help would be greatly appreciated.
 

Excel Facts

Why does 9 mean SUM in SUBTOTAL?
It is because Sum is the 9th alphabetically in Average, Count, CountA, Max, Min, Product, StDev.S, StDev.P, Sum, VAR.S, VAR.P.
Power Query:
let
    Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
    ChangeType = Table.TransformColumnTypes(Source,{{"Completion Date", type date}, {"Due Date", type date}}),
    Result = Table.AddColumn(ChangeType, "On Time?", each try if [Completion Date] <= [Due Date] then "Yes" else "No" otherwise if Date.From(DateTime.LocalNow()) <= [Due Date] then "Yes" else "No")
in
    Result

Book2
ABCDEFGHI
1TaskCompletion DateDue DateTaskCompletion DateDue DateOn Time?
2A4/5/20233/20/2023A4/5/20233/20/2023No
3B2/22/20233/7/2023B2/22/20233/7/2023Yes
4C1/26/20233/11/2023C1/26/20233/11/2023Yes
5D2/22/2023D2/22/2023No
6E3/2/20233/17/2023E3/2/20233/17/2023Yes
7F2/10/20233/23/2023F2/10/20233/23/2023Yes
8G4/28/2023G4/28/2023Yes
9H1/5/20233/11/2023H1/5/20233/11/2023Yes
10I2/22/20233/23/2023I2/22/20233/23/2023Yes
11J5/14/2023J5/14/2023Yes
12K4/8/20233/31/2023K4/8/20233/31/2023No
13L3/19/2023L3/19/2023No
14M3/17/20232/16/2023M3/17/20232/16/2023No
15N2/16/20233/9/2023N2/16/20233/9/2023Yes
16O4/11/20232/23/2023O4/11/20232/23/2023No
17P3/9/20233/11/2023P3/9/20233/11/2023Yes
18
Sheet1
Cells with Conditional Formatting
CellConditionCell FormatStop If True
E2:E17Expression=H2="No"textNO
 
Upvote 0
I was seeing if this can be done in PowerBI and not excel and then import to PowerBI. This looks like it is for Excel and not PowerBI.
 
Upvote 0

Forum statistics

Threads
1,223,360
Messages
6,171,630
Members
452,411
Latest member
sprichwort

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top