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

Data Days is here! Join us now for 60+ days of learning, challenges, and connection. Learn more

Reply
dday9
Frequent Visitor

Converting ColumnsUpdated Field

In my SQL datatable I have a ColumnsUpdated field which is a VARBINARY representation of the COLUMNS_UPDATED T-SQL function. I have a custom scalar-valued function which converts the column by essentially using the sys.fn_IsBitSetInBitmask function.

 

In SQL to get the names of the columns that were updated I create a new query, declare a VARCHAR variable, set the declared variable's value to the result of executing the function, and then print the variable's new value.

 

In Power BI I don't see anything similar to this, am I overlooking something?

1 ACCEPTED SOLUTION

@Greg_DecklerI was able to solve this issue by created a CTE in the Advanced Options of Get Data, setting up the relationship, and then displaying the parsed ColumnsUpdated from the CTE in a report.

 

The SQL I ran during import was:

WITH ChangeLog_CTE (Guid, ParsedUpdatedColumns)  
AS
(  
    SELECT
        Guid,
        (dbo.[GetChangedColumns]('History.Resources', History.Resources.ColumnsUpdated)) AS ParsedUpdatedColumns
    FROM
        History.Resources
)
SELECT *  
FROM ChangeLog_CTE;

 

View solution in original post

4 REPLIES 4
Greg_Deckler
Community Champion
Community Champion

I'm following about half of this. In Power BI you don't generally update existing columns and tables, it is for reporting. 



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

@Greg_DecklerI was able to solve this issue by created a CTE in the Advanced Options of Get Data, setting up the relationship, and then displaying the parsed ColumnsUpdated from the CTE in a report.

 

The SQL I ran during import was:

WITH ChangeLog_CTE (Guid, ParsedUpdatedColumns)  
AS
(  
    SELECT
        Guid,
        (dbo.[GetChangedColumns]('History.Resources', History.Resources.ColumnsUpdated)) AS ParsedUpdatedColumns
    FROM
        History.Resources
)
SELECT *  
FROM ChangeLog_CTE;

 

@dday9 , glad you got it figured out. Yes, the Advanced Options will let you run whatever SQL Query you desire. Didn't think of that as the answer to your question because I'm still not exactly sure what you are going for!! 🙂



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

My apologies, I should have been clearer in my original post.

 

The table that I am referring to is a temporal table and in this table there is a column named ColumnsUpdated. The ColumnsUpdated column is a VARBINARY column that is the result of the COLUMNS_UPDATED function via a trigger. What I'm attempting to do is created a Power BI report in which it displays a delimited list of columns that were updated for a given row (requirement A) as well as the user's name of who updated the row (requirement b).

 

Currently in my database I have a scalar-valued function that returns a delimited list, this would solve requirement A. I understand how to run the function in SQL to return the delimited list, but I don't understand how to run the function in Power BI.

Helpful resources

Announcements
Fabric Data Days is here Carousel

Fabric Data Days 2026

Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.

May Power BI Update Carousel

Power BI Monthly Update - May 2026

Check out the May 2026 Power BI update to learn about new features.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.