Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
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!