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

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.

Reply
garythomannCoGC
Impactful Individual
Impactful Individual

Dax scripting - output to flat file all table column unique data row counts

Wondering how one would go about creating a generic script to take the input name of a dataset.table and output to flat file all the unique data row counts for each column?  

The following is the dax pattern I want to replicate for each table.column.  The result of which would be nice to output to a flat file for analysis.

 

EVALUATE 
GROUPBY('Table',[column], "Count", COUNTX ( CURRENTGROUP (), 1 ))

 

Similar question asked recently and appreciate the advanced tab of dax studio.

Script to show row total counts of all tables of a dataset 

 

Posing these questions another way.  How do we do scripting in dax 'land' similar to how we do in sql 'land' :}

ie  sqlcmd, powershell, bash, etc

1 ACCEPTED SOLUTION
lbendlin
Super User
Super User

What you are describing is more suited for a Power Query implementation.  DAX doesn't have any function to manipulate column names, for example.

View solution in original post

2 REPLIES 2
garythomannCoGC
Impactful Individual
Impactful Individual

Multiple queries  This thread on github for dax studio looks promising for a future enhancement.

lbendlin
Super User
Super User

What you are describing is more suited for a Power Query implementation.  DAX doesn't have any function to manipulate column names, for example.

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.