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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
Cyriackpazhe
Frequent Visitor

Data lineage

How does Data lineage work? How is it lost? Can someone explain or provide links to resources. How can we maintain data lineage with treatas

3 ACCEPTED SOLUTIONS
bhanu_gautam
Super User
Super User

@Cyriackpazhe Go through this module 

https://learn.microsoft.com/en-us/power-bi/collaborate-share/service-data-lineage

 

And this video -https://www.youtube.com/watch?v=IfX3Npn6Nm4

https://www.youtube.com/watch?v=Hqs0lJJq1YA&t=350s

 

Data lineage is a process that tracks the journey of data from its origin through various transformations to its final destination. It captures all relevant metadata and events associated with the data throughout its lifecycle, including the source of the data set, transformations performed, and the final data set created

 

 




Did I answer your question? Mark my post as a solution! And Kudos are appreciated

Proud to be a Super User!




LinkedIn






View solution in original post

OwenAuger
Super User
Super User

Hi @Cyriackpazhe 

This would be my go-to article on this subject.

https://www.sqlbi.com/articles/understanding-data-lineage-in-dax/

 

My personal interpretation:

  • In any DAX expression returning a table, if a column of the resulting table (let's call it an "expression column") is created by referencing a single column of a physical table without modifying the column values (let's call the physical table column the "source column"), then the expression column is given a "tag" which identifies the source column. This tag is referred to as the column's "lineage".
  • Lineage of an "expression column" survives operations such as filtering or renaming of columns, but does not survive any operation that modifies the values in the column.
  • Lineage also does not survive when an expression column has multiple source columns. For example, if you UNION tables with different source columns, lineage is broken (i.e. lost) for any columns where there is a conflict in lineage.
  • Lineage is useful because it allows expression columns to have the same filtering effect as their corresponding source columns. Columns with no lineage have no filtering effect.
  • Lineage survives sequences of operations as long as nothing is done to break lineage at any stage and each expression column maintains a single unadulterated source column (as described above).
  • Table expressions can happily exist with columns whose source columns are from different physical tables. This can be useful when you need to construct a complex filter of some sort.
  • The TREATAS function allows lineage to be assigned to any table expression. This is useful in cases where lineage has been lost earlier for some reason, or when lineage did not exist in the first place, but the resulting table expression needs to be used for filtering. TREATAS effectively lets you specify the source column for each expression column within a table expression.

Well, that's a bit of a brain dump. The SQLBI article above has various DAX examples but I could come up with some examples to post here if that's useful.

 

I'm sure the community members have some useful insights/comments to add as well!


Owen Auger
Did I answer your question? Mark my post as a solution!
Blog
Twitter
LinkedIn

View solution in original post

@Cyriackpazhe 

Sure, I've put together some examples in a set of dax.do queries here:

https://dax.do/WsgXRvl1IeQr4f/

All query results include a "Sales Amount" column.  I've set these up so that it's obvious when lineage is lost because Sales Amount is identical on all rows (since lineage is lost, no filter applies).

e.g.

OwenAuger_0-1738532999462.png

 

Hope this helps!

Regards,

Owen


Owen Auger
Did I answer your question? Mark my post as a solution!
Blog
Twitter
LinkedIn

View solution in original post

4 REPLIES 4
OwenAuger
Super User
Super User

Hi @Cyriackpazhe 

This would be my go-to article on this subject.

https://www.sqlbi.com/articles/understanding-data-lineage-in-dax/

 

My personal interpretation:

  • In any DAX expression returning a table, if a column of the resulting table (let's call it an "expression column") is created by referencing a single column of a physical table without modifying the column values (let's call the physical table column the "source column"), then the expression column is given a "tag" which identifies the source column. This tag is referred to as the column's "lineage".
  • Lineage of an "expression column" survives operations such as filtering or renaming of columns, but does not survive any operation that modifies the values in the column.
  • Lineage also does not survive when an expression column has multiple source columns. For example, if you UNION tables with different source columns, lineage is broken (i.e. lost) for any columns where there is a conflict in lineage.
  • Lineage is useful because it allows expression columns to have the same filtering effect as their corresponding source columns. Columns with no lineage have no filtering effect.
  • Lineage survives sequences of operations as long as nothing is done to break lineage at any stage and each expression column maintains a single unadulterated source column (as described above).
  • Table expressions can happily exist with columns whose source columns are from different physical tables. This can be useful when you need to construct a complex filter of some sort.
  • The TREATAS function allows lineage to be assigned to any table expression. This is useful in cases where lineage has been lost earlier for some reason, or when lineage did not exist in the first place, but the resulting table expression needs to be used for filtering. TREATAS effectively lets you specify the source column for each expression column within a table expression.

Well, that's a bit of a brain dump. The SQLBI article above has various DAX examples but I could come up with some examples to post here if that's useful.

 

I'm sure the community members have some useful insights/comments to add as well!


Owen Auger
Did I answer your question? Mark my post as a solution!
Blog
Twitter
LinkedIn

Hi owen, your explanation was helpful, but could you post the examples

 

@Cyriackpazhe 

Sure, I've put together some examples in a set of dax.do queries here:

https://dax.do/WsgXRvl1IeQr4f/

All query results include a "Sales Amount" column.  I've set these up so that it's obvious when lineage is lost because Sales Amount is identical on all rows (since lineage is lost, no filter applies).

e.g.

OwenAuger_0-1738532999462.png

 

Hope this helps!

Regards,

Owen


Owen Auger
Did I answer your question? Mark my post as a solution!
Blog
Twitter
LinkedIn
bhanu_gautam
Super User
Super User

@Cyriackpazhe Go through this module 

https://learn.microsoft.com/en-us/power-bi/collaborate-share/service-data-lineage

 

And this video -https://www.youtube.com/watch?v=IfX3Npn6Nm4

https://www.youtube.com/watch?v=Hqs0lJJq1YA&t=350s

 

Data lineage is a process that tracks the journey of data from its origin through various transformations to its final destination. It captures all relevant metadata and events associated with the data throughout its lifecycle, including the source of the data set, transformations performed, and the final data set created

 

 




Did I answer your question? Mark my post as a solution! And Kudos are appreciated

Proud to be a Super User!




LinkedIn






Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

Find out what's new and trending in the Fabric community.