Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and a 50 percent discount on exams.
Get startedEarn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
this is the error i am getting when i create a column AFELeeway.
Seems like you are mixing M syntax with DAX syntax. They are two different languages. See this article:
https://community.powerbi.com/t5/Community-Blog/The-Languages-of-Power-BI/ba-p/69104
DAX IF syntax is exactly like Excel IF syntax.
IF(<condition>, <true>, <false>)
M syntax is:
if <condition> then <true> else <false>
still error is coming.Error is coming near is date.How to solve it.
"is" is not valid syntax for either DAX or M, you need to use =
I am getting error as below:
Failed to resolve name 'date'. It is not a valid table, variable, or function name.
And my code is :
AFELeeway = if((Query1[FullAfeApproved] = date),(DATEDIFF(Query1[FullAfeApproved],Query1[EstimatedSpud],DAY)-Query1[parmAFELeeway]), (DATEDIFF(TODAY(),Query1[EstimatedSpud],DAY)-Query1[parmAFELeeway]))
Actually, I want to check whether the field is a proper date
@vignesh21,
Do you want to check that if the data type of FullAfeApproved column is date using dax? If so, it is not possible.
What data type do you set for the FullAfeApproved column? All values of the FullAfeApproved column can only be a single data type(e.g, Date). If you change data type of FullAfeApproved column to date, you are able to directly use DATEDIFF() function, and you are able to check if a value of FullAfeApproved column equals/is greater/is less than to a specific date value. Here is an example for you.
AFELeeway = if(Query1[FullAfeApproved] <=TODAY(),(DATEDIFF(Query1[FullAfeApproved],Query1[EstimatedSpud],DAY)-Query1[parmAFELeeway]), (DATEDIFF(TODAY(),Query1[EstimatedSpud],DAY)-Query1[parmAFELeeway]))
Regards,
Lydia
User | Count |
---|---|
91 | |
74 | |
67 | |
63 | |
55 |
User | Count |
---|---|
99 | |
88 | |
72 | |
60 | |
59 |