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
Hope someone can point me in the right direction please.
I want the field "Days Open" to display the difference between Today's date and Date Identified (GMT) in days. However, I only want it to populate if the Status field is = "Open".
This is what I have so far (which PowerBI doesn't like).
Solved! Go to Solution.
Hi @stokidez ,
Does your table have null values on 'Breach Log'[Date Identified (GMT)?
If not, try to return BLANK() instead of "" in your if-statement.
DATEDIFF returns a numeric value and you're forcing a string if the statement is false.
Best Regards,
Eduardo
Hi @stokidez ,
I am happy to know that I have given a positive contribution to resolving this issue.
One of the disadvantages of using BLANK() is when we use the column in a visual, it will, by default, ignore them.
There are two solutions to this:
1st - Show items without data in the visual
2nd - Instead of using blank (), use, for example, the value -1.
Choose the one that makes the most sense for your report.
Best Regards,
Eduardo
Hi @stokidez ,
Does your table have null values on 'Breach Log'[Date Identified (GMT)?
If not, try to return BLANK() instead of "" in your if-statement.
DATEDIFF returns a numeric value and you're forcing a string if the statement is false.
Best Regards,
Eduardo
I've added this field now to a table which shows all breaches regardless of status and it is automatically only displaying "Open" breaches and no longer displaying "potential" or "closed". Is there a way to force the table to show all breaches regardless of status? @edugoncalves Thanks,
Hi @stokidez ,
I am happy to know that I have given a positive contribution to resolving this issue.
One of the disadvantages of using BLANK() is when we use the column in a visual, it will, by default, ignore them.
There are two solutions to this:
1st - Show items without data in the visual
2nd - Instead of using blank (), use, for example, the value -1.
Choose the one that makes the most sense for your report.
Best Regards,
Eduardo
@edugoncalves You star! 1st option was perfect for what I needed. Learnt two new things now thanks to you - really appreciate the support.
@stokidez
I am truly happy to know that you have learned something new today, continue to explore and you will learn more and more every day! 😋
Best Regards,
Eduardo
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!