
🔗 Lineage in DAX: The Concept Power BI Uses Silently#
Did you know that Power BI uses the concept of lineage every time it applies a filter from a report? 🤔
What Is Lineage in DAX?#
Lineage is the association that a table or set of values has with a specific column in the data model. When a variable has lineage, DAX can use it directly as a filter. Without lineage, you need to explicitly specify which column you are filtering.
🛠️ How to Set Lineage: TREATAS()#
The TREATAS() function assigns lineage to a set of values:
VAR YearMonthFilter = TREATAS({ 202604 }, 'Date'[MonthKey])Now YearMonthFilter can be passed directly as a filter to CALCULATETABLE() or SUMMARIZECOLUMNS().
❌ How to Clear Lineage: VALUE()#
If you apply VALUE() to a variable that has lineage, the lineage is removed and the DAX engine can no longer use it as a filter without an explicit comparison.
💡 Explanation in a nutshell#
Think of a label with a street name on it. That label knows which street it belongs to (it has “lineage”). If you peel it off and stick it on a blank piece of paper, nobody knows which street it refers to anymore (no lineage). In DAX, TREATAS() is like attaching the correct label, and VALUE() is like peeling it off.
More information at the link 👇

