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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
Jess303
Frequent Visitor

Dates and blanks to be values in another column

I have a date field that has dates and blanks. All I would like to do is have a column that if there is date I want the value to be one and if it is blank to have a value of zero in a corresponding column.  Is this possible? Here is an example of what I would like it to look like:

Submit dateSubmision
1/1/20221
2/4/20121
 0
 0
3/1/20091
1 ACCEPTED SOLUTION

hi @Jess303 

in PQ, try like:

if [Date]=null then 0 else 1

View solution in original post

4 REPLIES 4
FreemanZ
Super User
Super User

hi @Jess303 

try like:

Column =
IF(
  [Date]=BLANK,
 0, 1
) +0

Did not work, When I am in Power query editor the blanks are null values. 

hi @Jess303 

in PQ, try like:

if [Date]=null then 0 else 1

Worked like a charm, Thanks!

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

Power BI Carousel June 2024

Power BI Monthly Update - June 2024

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

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.