Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
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
User | Count |
---|---|
76 | |
75 | |
46 | |
31 | |
27 |
User | Count |
---|---|
99 | |
91 | |
51 | |
49 | |
46 |