Last active
April 16, 2025 01:47
-
-
Save bjulius/bbe97b5a954fc15fd58dea76e066e5b4 to your computer and use it in GitHub Desktop.
DAX Measure to Extract Data Model Info for Prompting AI
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
BIM Info = | |
VAR TableInfo = | |
ADDCOLUMNS ( | |
INFO.VIEW.TABLES (), | |
"Component", "Tables" | |
) | |
VAR ColumnInfo = | |
ADDCOLUMNS ( | |
INFO.VIEW.COLUMNS (), | |
"Component", "Columns" | |
) | |
VAR RelationshipInfo = | |
ADDCOLUMNS ( | |
INFO.VIEW.RELATIONSHIPS (), | |
"Component", "Relationships" | |
) | |
VAR MeasureInfo = | |
ADDCOLUMNS ( | |
INFO.VIEW.MEASURES (), | |
"Component", "Measures" | |
) | |
VAR Result = | |
TOCSV ( TableInfo ) | |
& TOCSV ( ColumnInfo ) | |
& TOCSV ( RelationshipInfo ) | |
& TOCSV ( MeasureInfo ) | |
RETURN | |
Result | |
// Authored by Brian Julius, Feb 2025 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
There seems to be either limit to output size, or TOCSV (tried TOJSON as well) trips over some special characters - in large model I'm getting just few percent of Measures data, it is severely truncated.
Doesn't happen when I run INFO.VIEW.MEASURES directly.
@bjulius have you encountered this issue?