This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. We're covering it all. You won't want to miss it.
Learn moreLevel up your Power BI skills this month - build one visual each week and tell better stories with data! Get started
Hello,
Im not confortable with DAX , someone can tell me how to translate this : " if Date.From([DateCreation]) > Date.From(Date.AddDays(DateTime.LocalNow(),-2)) then 0 else 1)" to DAX please ? i tried so many thing but it didnt worked.
Thanks for the future answer, great day
Solved! Go to Solution.
Hi ItSupportElm,
You could follow above suggestions. If you want to create calculated column, you could try below expression
Column = if('Table'[date]>TODAY()-2,0,1)
If you want to use measure, you could try below expression
Measure 2 = if(MIN('Table'[date])>TODAY()-2,0,1)
Best Regards,
Zoe Zhi
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Thanks for the answer guys.
@dax i tried your expression but there is an error at the end : ( i thought that was ";" but is not that neither)
Same for a new colomn :
Thanks again for helping me
I found out why it not work,
Hi ItSupportElm,
You could follow above suggestions. If you want to create calculated column, you could try below expression
Column = if('Table'[date]>TODAY()-2,0,1)
If you want to use measure, you could try below expression
Measure 2 = if(MIN('Table'[date])>TODAY()-2,0,1)
Best Regards,
Zoe Zhi
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Thanks for the answer guys.
@dax i tried your expression but there is an error at the end : ( i thought that was ";" but is not that neither)
Same for a new colomn :
Thanks again for helping me
I found out why it not work,
Hi,
It would be something like this. Assuming you`re adding a calculated columns and not creating a measure.
In the table you want to add the column, create a new calculated column and type this.
if ( TableName[Date Field] > DATEADD ( TODAY(); -2; Days) ; 0 ; 1)
You may need to adjust some naming but the overall idea is this.
Hope it helps
Check out the April 2026 Power BI update to learn about new features.
Sign up to receive a private message when registration opens and key events begin.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 2 | |
| 2 |