Get certified for free when you join Fabric Data Days 2026 and dive into Fabric, Power BI, SQL, AI, and other essential data skills.
Join nowTry your skills in the Power BI Dataviz World Championship! Round one ends June 26. Join now
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?
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.
@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.
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?
| User | Count |
|---|---|
| 22 | |
| 20 | |
| 19 | |
| 19 | |
| 11 |
| User | Count |
|---|---|
| 63 | |
| 53 | |
| 46 | |
| 44 | |
| 31 |