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.
I thought this would be straight forward, but it's not. I need to put an actual date into a formula as a filter. I don't know the format to use for dates in this instance and I'm thinking that must be the problem.
This works when I'm filtering by FY:
Hi @Anonymous ,
I don’t understand why you need the RELATEDTABLE() function. If you remove this function, what result will be returned by the measure?
Best regards,
Lionel Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hey @Anonymous
try this
UFY19MX = SUMX( FILTER(RELATEDTABLE(Sales),Sales[InvDate]>"04/06/2020"),Sales[Units])
Regards,
Tom
Thanks for the suggestion but it didn't like that. It threw this error at me - look like putting quotation marks around it makes DAX think it's text.
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.
Hey @Anonymous ,
sorry, my statement did miss an essential part, you have to wrap the function DATEVALUE(...) around the string.
Using DATEVALUE has a caveat, read this article: https://docs.microsoft.com/en-us/dax/datevalue-function-dax
You might consider using text operations to extract the YEAR, MONTH, DATE part from the string, convert these strings into a DATE using the DATE function.
Regards,
Tom
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 |
---|---|
109 | |
99 | |
77 | |
66 | |
54 |
User | Count |
---|---|
144 | |
104 | |
102 | |
87 | |
64 |