Forum Discussion
Date format problem
I dont receive any error,I dont recieve the answer that is expected. I supposed to receive 1 instead of 0 for column_test. Means that the formulah does not work.
- Phil_Seamark9 years agoMicrosoft Employee
Can you please add 3 test columns to your table (to be deleted later)
My Year Col = YEAR([Measure]) My Month Col = MONTH([Measure]) My Day Col = DAY([Measure])
Just to see if these values are what you would expect
- parry2k9 years agoSuper User
myti you mentioned it is a calculated measures which is date type?
What formula you are using for this calculated measures?
What is your data source?
What is data type of this new measure?
Also as Phil_Seamark mentioned, create those fields to see what value you are getting?
Can you also try this following, assuming your locale setting for date is MM/DD/YYYY, just wondering if your measure is text type and following formula will convert date to text for comparison purpose.
CalculatedColumn=IF([Measure]=FORMAT(DATE(2017,1,1), "MM/DD/YYYY"),1,0)
Although there are many unknown, once we have reply on above question, it will help to resolve the issue.
Thanks,
Parv
- myti9 years agoHelper II
Hi parry2k
I receive the value for calculated measure based on the below formula.It get the current value of page level filter which is based on the date format.
Measure = If ( HasOneValue('landing-pages'[ipg:month]) , Values ('landing-pages'[ipg:month]))
I tried your formulah but I recived error ("DAX comparison operations do not support comparing values of type Date with values of type Text. Consider using the VALUE or FORMAT function to convert one of the values.")
Hopefully my information is good enough to find a solution.
Thank you,
Myti
- myti9 years agoHelper II
I added 3 columns as you mentioned. Unfortunetly, the results for all variables is nan.!