Forum Discussion
moutinhoabreu
7 years agoFrequent Visitor
DATEDIFF, calculate days between today and SQL date field, error
Hi All, I had a new column with the DATEDIFF working fine and suddendly stoped working. Age = DATEDIFF(utcnow()+ 'Contas correntes de clientes'[dataven]+ DAY) I was calculating the number...
- 7 years ago
Seems like this should be the one:
Age = DATEDIFF(UTCTODAY(), 'Contas correntes de clientes'[dataven], DAY)
Is this a column or a measure?
This is what worked for me in a standard Calendar table:
Column = DATEDIFF(UTCTODAY(), [Date], DAY)
Greg_Deckler
Community Champion
7 years agoSeems like this should be the one:
Age = DATEDIFF(UTCTODAY(), 'Contas correntes de clientes'[dataven], DAY)
Is this a column or a measure?
This is what worked for me in a standard Calendar table:
Column = DATEDIFF(UTCTODAY(), [Date], DAY)
moutinhoabreu
7 years agoFrequent Visitor
It’s a column. I was aware of that limitation in measures.
Could it be possible due a direct query limitation on last power bi update ?
Since it was working before
Anyway you’re using DATE field without quotations and on my side when I select a sql field automatically places inside quotation ‘ xxxx ‘
Could it be possible due a direct query limitation on last power bi update ?
Since it was working before
Anyway you’re using DATE field without quotations and on my side when I select a sql field automatically places inside quotation ‘ xxxx ‘
- PattemManohar7 years ago
Community Champion
moutinhoabreu The single quotes in your expression is because of Spaces in your table name. It's no harm having single-quotes even if you don't have spaces in your tablename.