Forum Discussion
Overcome data type problem in direct query
You can try to add calculated columns even in DirectQuery mode. On the right side in the Fields panel right-click on the table name and choose New column. Then you can simply use DAX (with several limitations) to create all columns needed, e.g.:
Year = YEAR(YourTable[Posting Date]) Month Number = MONTH(YourTable[Posting Date])
- Botturovic9 years agoFrequent Visitor
Thank you for yout help pawelpo,
i've tried to follow your instructions but i got an error message of the same type:
"this operation generates a query that is not supported in Direct Query mode."
- v-yulgu-msft9 years agoMicrosoft Employee
Hi Botturovic,
In my test, I was able to create calculated columns to generate Year column and month column. And I was able to add these two calculated columns into Axis section of the bar chart.
Year = YEAR(test04[Date])
Month = Month(test04[Date])Besides, please try the Bin function to see whether it works for you.
Best regards,
Yuliana Gu