cdaiga
cdaiga

Reputation: 4937

How to tame case sensitivity of Power BI function name

I am new to using Power BI. I just noticed I cannot call Power BI functions following the case-sense used in the Power BI doc.

For example Date.YEAR([creation_date]) yields an error as Date.YEAR is not recognized. But Date.Year([creation_date]) works fine.

My question is how do I set Power BI to accept both functions names?

Upvotes: 0

Views: 201

Answers (1)

Alexis Olson
Alexis Olson

Reputation: 40204

When you mention "case-sense used in the Power BI doc", I'm guessing you're referring to DAX functions used to write measures (e.g. YEAR()). DAX is indeed not case-sensitive and you can use whatever you prefer.

However, Date.Year([creation_date]) appears to be M language code (see Date.Year) that is used in the query editor. The M language is case-sensitive and I don't think there is an easy way around it.

Upvotes: 1

Related Questions