Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
I have query where im trying to if condition but im getting error please anyone can help me out on this Thanks
=(if(today()>=[start] and today() <=[end]) then [#"%Total_plan"] else "0")
Solved! Go to Solution.
Hi skorpion ,
In M query:
= if [start] <= DateTime.Date(DateTime.LocalNow()) and [end] >= DateTime.Date(DateTime.LocalNow()) then [#"%Total_plan"] else "0"
In DAX:
Result = IF ( TODAY () >= [start] & TODAY () <= [end], [#"%Total_plan"], "0" )
Regards,
Jimmy Tao
Hi skorpion ,
In M query:
= if [start] <= DateTime.Date(DateTime.LocalNow()) and [end] >= DateTime.Date(DateTime.LocalNow()) then [#"%Total_plan"] else "0"
In DAX:
Result = IF ( TODAY () >= [start] & TODAY () <= [end], [#"%Total_plan"], "0" )
Regards,
Jimmy Tao
Are you in the query editor? Or are your writing a DAX statement?
Did I answer your question? Mark my post as a solution! Proud to be a Super User!
Connect with me!
Stay up to date on
Read my blogs on
User | Count |
---|---|
125 | |
106 | |
99 | |
63 | |
62 |
User | Count |
---|---|
135 | |
116 | |
101 | |
71 | |
61 |