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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

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
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

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

MayPowerBICarousel

Power BI Monthly Update - May 2024

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

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.