Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
I want to see the difference between dates in Days From LoanStartDate to PaidOffDate and If there is a blank I want it to show blank
Solved! Go to Solution.
Hi @ligalbert ,
Here a possible solution:
And here the DAX for either the measure or the calculated column:
DateDiffCol = DATEDIFF ( Table[LoanStartDate], Table[PaidOffDate], DAY )
DateDiffMeasure = IF ( DATEDIFF ( MAX ( Table[LoanStartDate] ), MAX ( Table[PaidOffDate] ), DAY ) = BLANK(), "", DATEDIFF ( MAX ( Table[LoanStartDate] ), MAX ( Table[PaidOffDate] ), DAY ) )
To "show" the blanks, requires to actually convert blanks to empty strings.
Let me know if this solves your issue 🙂
/Tom
https://www.tackytech.blog/
https://www.instagram.com/tackytechtom/
Did I answer your question❓➡️ Please, mark my post as a solution ✔️ |
Also happily accepting Kudos 🙂 |
Feel free to connect with me on LinkedIn! |
#proudtobeasuperuser |
Hi @ligalbert
Please use
DATEDIFF(<start_date>, <end_date>, <interval>) and choose DAY for the interval.
Let me know if you have any questions.
If this solves your issues, please mark it as the solution, so that others can find it easily. Kudos 👍are nice too.
Nathaniel
Proud to be a Super User!
Hi @ligalbert ,
Here is an easy way to take care of the blank, too.
DateDiff =
var _dateDiff = DATEDIFF(MAX(TT7[Column1]),MAX(TT7[Column2]),DAY)
return (IF(isblank(_dateDiff),"",_dateDiff))
Let me know if you have any questions.
If this solves your issues, please mark it as the solution, so that others can find it easily. Kudos 👍are nice too.
Nathaniel
Proud to be a Super User!
Hi @ligalbert ,
Here a possible solution:
And here the DAX for either the measure or the calculated column:
DateDiffCol = DATEDIFF ( Table[LoanStartDate], Table[PaidOffDate], DAY )
DateDiffMeasure = IF ( DATEDIFF ( MAX ( Table[LoanStartDate] ), MAX ( Table[PaidOffDate] ), DAY ) = BLANK(), "", DATEDIFF ( MAX ( Table[LoanStartDate] ), MAX ( Table[PaidOffDate] ), DAY ) )
To "show" the blanks, requires to actually convert blanks to empty strings.
Let me know if this solves your issue 🙂
/Tom
https://www.tackytech.blog/
https://www.instagram.com/tackytechtom/
Did I answer your question❓➡️ Please, mark my post as a solution ✔️ |
Also happily accepting Kudos 🙂 |
Feel free to connect with me on LinkedIn! |
#proudtobeasuperuser |
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
115 | |
99 | |
88 | |
70 | |
62 |
User | Count |
---|---|
151 | |
120 | |
103 | |
87 | |
68 |