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.
Hi,
I am new to DAX and Power BI and I having some problems with the bellow formula.
INF - IF ([DateTime ]«DATE (YEAR (TODAY ()), MONTH (TODAY ()), 1), 1, 0)
DAX comparison operations do not support comparing values of type Text with
values of type Date. Consider using the VALUE or FORMAT function to convert one
of the values.
How can I fix this formula? Any help will be very appreciated.
Thank you!
Solved! Go to Solution.
Hi,
Yes, you are correct. The text data type was DateTime. I figured it out by adding Value(DateTime).
INF = IF (Value([DateTime ])«DATE (YEAR (TODAY ()), MONTH (TODAY ()), 1), 1, 0).
Thank you for replying to my message.
Hi @Anonymous
Which one is the text data taype column?
Hi,
Month is the text data type
@Anonymous
MONTH here is a function not a column and this function returns integer value from 1-12 that is the month number.
Hi,
Yes, you are correct. The text data type was DateTime. I figured it out by adding Value(DateTime).
INF = IF (Value([DateTime ])«DATE (YEAR (TODAY ()), MONTH (TODAY ()), 1), 1, 0).
Thank you for replying to my message.
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 |
---|---|
43 | |
21 | |
20 | |
15 | |
13 |
User | Count |
---|---|
45 | |
41 | |
39 | |
19 | |
19 |