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 folks, integrating a simple 2 field query and receiving the error;
"Expression.Error: The specified sort criteria is invalid"
I suspect the fact that I'm using CAST for the date field may be an issue, however I have no problem running it in SQL and the data does appear in my BI form...any thoughts?
SELECT
CAST([TRSAddedTime] as Date) as Date
,count([TRSSubmitCount]) as Trans
FROM
AdminLevel.dbo.tblTransStorage
WHERE
TRSAddedTime >= Dateadd(day, -30, getdate())
Group By
CAST([TRSAddedTime] as Date)
,[TRSSubmitCount]
Order By Date Desc
Solved! Go to Solution.
Thank you Xiaoxin, I was able to find a work around. I removed the "Cast" function within the SQL statement and used Power BI to convert the data type to "Date" for that field. Doing this allowed me to format the report as I needed. Thanks.
Hi @AffirmSupport,
Your query seems well, did you use the direct query mode to connect the sql database? If as I said, there are some limitations on direct query mode, you can use import mode and test again.
If above is not help, can you provide more detail information about your issue?(e.g. screenshots, connect mode, detail steps...)
Regards,
Xiaoxin Sheng
Thank you Xiaoxin, I was able to find a work around. I removed the "Cast" function within the SQL statement and used Power BI to convert the data type to "Date" for that field. Doing this allowed me to format the report as I needed. Thanks.
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 |
---|---|
110 | |
94 | |
81 | |
66 | |
58 |
User | Count |
---|---|
150 | |
119 | |
104 | |
87 | |
67 |