Search code examples
functionpowerbidaxcase-sensitivem

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?


Solution

  • 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.