Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.
issue: when I use treatas on a variable table within a measure I am seeing different behavior if I treatas the column to a fact or dimension table.
when I apply treatas to change the data lineage to the dimension table, the relationship does not hold and the filter from the dimension table is not considered.
However when the treatas is pointed at the fact table (which has a many to 1 relationship to the same dimension table) the behavior appears to work correctly.
is there something going on within treatas which requires a condition to work? Is it possible that if I am changing the data type within dax on the key this is messing it up?
I don't think its TREATAS messing things up, I just ran
DEFINE
VAR ProdKeys = { 599, 1885, 1895 }
EVALUATE
ROW(
"Using Product",
CALCULATE ( [Sales Amount], TREATAS ( ProdKeys, 'Product'[ProductKey] )),
"Using Sales",
CALCULATE ( [Sales Amount], TREATAS ( ProdKeys, 'Sales'[ProductKey] ))
)
on dax.do and it gave the same answer for both calculations, as expected.
What did you mean by changing the data type on the key ?
sure - here is an example of the measure i'm using
Do you have an example you can share ?
From what you've said it sounds like you are trying to define a table in a variable and then recalculate it using TREATAS. That won't work, a variable is only calculated once, when it is define. Trying to recalculate later won't change the result. Variables aren't really variable, they're more like constants.
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the October 2025 Power BI update to learn about new features.
User | Count |
---|---|
10 | |
8 | |
6 | |
4 | |
3 |