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!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Was wondering if there is a straight forward way to script dax (or some other language) ?
Rather than writing the same/similar dax again and again for common needs would nice to put in a bit more effort to create repeatable scripts to do the job now and into the future.
For example, everytime we use a new/unfamiliar dataset it would be nice to fire a script against the dataset to show say total record counts of all the tables within.
A simple dax code got me started now I want to make this generic for all the tables in any dataset.
-- show table counts
EVALUATE
UNION (
ROW ( "Table", "Benefit Realisation List",
"Count", COUNTROWS('Benefit Realisation List') ),
ROW ( "Table", "Project Achievability Y1 List",
"Count", COUNTROWS('Project Achievability Y1 List') )
)
-- show column stats for every table
--EVALUATE COLUMNSTATISTICS()
I am aware of the tablur editor and c# scripting so maybe this is the only way to go.
Solved! Go to Solution.
Hi,
The problem regarding tabular editor scripts are that they are meant for modifying the model.bim file. Because of this you can't really use them to analyze the model data. However DAX studio's metric pane does what you are looking for pretty well:
E.g. in the "summary" section you can see the amount of tables, columns and the size of the model.
I hope this post helps to solve your issue and if it does consider accepting it as a solution and giving the post a thumbs up!
My LinkedIn: https://www.linkedin.com/in/n%C3%A4ttiahov-00001/
Proud to be a Super User!
Dax scripting - output to flat file all table column unique data row counts
Just tieing two similar questions together.
Hi,
The problem regarding tabular editor scripts are that they are meant for modifying the model.bim file. Because of this you can't really use them to analyze the model data. However DAX studio's metric pane does what you are looking for pretty well:
E.g. in the "summary" section you can see the amount of tables, columns and the size of the model.
I hope this post helps to solve your issue and if it does consider accepting it as a solution and giving the post a thumbs up!
My LinkedIn: https://www.linkedin.com/in/n%C3%A4ttiahov-00001/
Proud to be a Super User!
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
| User | Count |
|---|---|
| 21 | |
| 10 | |
| 9 | |
| 4 | |
| 4 |
| User | Count |
|---|---|
| 35 | |
| 31 | |
| 20 | |
| 13 | |
| 10 |