Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
I'm sure you will be able to tell from my questions that I can a complete newbie. Thanks in advance for your patience.
I'm working with an excel spreadsheet and I have a column called Next Assessment Date which includes some dates and some blanks. Some dates are in the past and some are in the future. When I look at the table in PBI, the Next Assessment Date column in blank. When I look at the query, the same column has dates values and "null" appropriately.
I would like to add a new column. The values in the new column would be calculated based on a formula like this:
Column = if(isblank([Next Assessment Date]),0,datediff([Next Assessment Date],today(),day)).. which produces an error: start date cannot be greater than the end date.
My questions are:
Why do I only see date values and "null" in Next Assessment Date column in the query (as opposed to the table)?
Should I add the column to the table or the query? Why?
Solved! Go to Solution.
Hi @ckennedy,
As you said, "Some dates are in the past and some are in the future.", and the start date cannot be greater than the end date when you use DATDIFF function.
So, please try this:
Column =
IF (
ISBLANK ( [Next Assessment Date] ),
0,
IF (
Table3[Next Assessment Date] < TODAY (),
DATEDIFF ( [Next Assessment Date], TODAY (), DAY ),
DATEDIFF ( TODAY (), [Next Assessment Date], DAY )
)
)
Best regards,
Yuliana Gu
Thank you Yuliana. This got rid of the error in my new column I'm calling [Days Since NAD].
Now, the [Next Assessment Date] column is completely blank. I see date values in the query, but not the table. What would cause an entire column to be blank? I'm assuming this is why [Days Since NAD] (using the new formula) has all zeros.
Hi @ckennedy,
What do you mean "Query" and "Table"? You said the [Next Assessment Date] column is completely blank, was this column an original field in source data or a calculated column? Can you post a screenshot to show the result you got?
Regards,
Yuliana Gu
Sorry, I wasn't very clear.
When I go to the table, [Next Assessment Date] has no values in the column. When I edit the query, the [Next Assessment Date] column has "null" or date values as I would expect.
I'm wondering why values are missing in the table.
TABLE
QUERY
Hi @ckennedy,
Do you mean there isn't any data in [Next Assessment Date] in Table view?
The row order is not the same in TABLE and QUERY. If there is a large number of data records in table, please sroll down o check whether all rows are empty. Please check whether below highlighted records exists in TABLE.
Regards,
Yuliana Gu
I figured it out. Thanks for the help!
The syntax for DATEDIFF is DATEDIFF(<start_date>, <end_date>, <interval>). Since you have some dates in the past and future, the error is produced.
For Next Assessment, can you provide your sample PBIX file?
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
| User | Count |
|---|---|
| 57 | |
| 45 | |
| 42 | |
| 20 | |
| 18 |
| User | Count |
|---|---|
| 169 | |
| 109 | |
| 91 | |
| 55 | |
| 44 |