Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Level up your Power BI skills this month - build one visual each week and tell better stories with data! Get started

Reply
Anonymous
Not applicable

TREATAS function not available

I am using Power BI Desktop (January 2020). I am trying to use the TREATAS function. I see several articles online describing this as being available since at least 2017. But when I use it I get the error: "Failed to resolve the name "TREATAS". It is not a valid table, variable, or function name". 

Here is how the measure which gives the error.

 

 

TestMeasure = 
    CALCULATE(
        [Some Other Measure]
        ,TREATAS(
            VALUES('Table1'[DateField1])
            , 'dimDate'[Date]
        )
    )

 

 Can anyone suggest what is wrong?

4 REPLIES 4
v-zhenbw-msft
Community Support
Community Support

Hi @Anonymous ,

 

It maybe the version issue.You can use the app store version and try again.

 

Or what result do you want to get with this measure?

Could you replace it with FILTER function?

 

Best regards,

 

Community Support Team _ zhenbw

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Greg_Deckler
Community Champion
Community Champion

@Anonymous TREATAS was available in SSAS before Power BI. Would have to check when it was added. Are you using an RS edition of the Desktop? That might lag even further.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...
amitchandak
Super User
Super User

@Anonymous , that is strange. Not sure if you can upgrade to the latest version and check.

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

The "Power BI Desktop (January 2020)" version is for Power BI Report Server. Is there different functionality in DAX commands available in this version, I wonder?

Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

Check out the April 2026 Power BI update to learn about new features.

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.