Forum Discussion
TREATAS in Power Pivot
Hi All,
i am trying to use "TREATAS" function in a Power Pivot model (so in Excel). It seems that this function does not exist. Is this a problem related to the excel version or this function is available only in PBI? Eventually how i can achieve the same result without using this function in Power Pivot (create a virtual relationship)
thanks for the support
Best
Luca
Hey Anonymous ,
without knowing your data source I think the following measure should give you the same result:
Ordinato2 = CALCULATE( SUM( 'Sales Orders'[ValoreOrdinato #] ), INTERSECT( ALL( 'Sales Orders'[COMMESSA_RIF] ), VALUES( Database[COMMESSA_RIF] ) ) )If you need any help please let me know.If I answered your question I would be happy if you could mark my post as a solution ✔️ and give it a thumbs up 👍Best regardsDenisBlog: WhatTheFact.biFollow me: twitter.com/DenSelimovic
6 Replies
- selimovdMost Valuable Professional
Hey Anonymous ,
the function TREATAS doesn't exist in Power Pivot for Excel:
I don't know exactly your scenario, but you could probably try to solve it with FILTER or INTERSECT.
If you need any help please let me know.If I answered your question I would be happy if you could mark my post as a solution ✔️ and give it a thumbs up 👍Best regardsDenisBlog: WhatTheFact.biFollow me: twitter.com/DenSelimovic- AnonymousNot applicable
Hi selimovd
i am managing the problem with this formula in PBI
Ordinato2 = CALCULATE(SUM('Sales Orders'[ValoreOrdinato #]),TREATAS(VALUES(Database[COMMESSA_RIF]),'Sales Orders'[COMMESSA_RIF]))How i can change it to make it fit in Power Pivot?thanksLuca- selimovdMost Valuable Professional
Hey Anonymous ,
without knowing your data source I think the following measure should give you the same result:
Ordinato2 = CALCULATE( SUM( 'Sales Orders'[ValoreOrdinato #] ), INTERSECT( ALL( 'Sales Orders'[COMMESSA_RIF] ), VALUES( Database[COMMESSA_RIF] ) ) )If you need any help please let me know.If I answered your question I would be happy if you could mark my post as a solution ✔️ and give it a thumbs up 👍Best regardsDenisBlog: WhatTheFact.biFollow me: twitter.com/DenSelimovic