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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
ahmedsilat
New Member

Finding the Count of Columns in a table that starts with 'Custom Field'

Hi Community,

 

There is a requirement in which I need to count the number of columns created in a table during some post-processing of a client's data file. These will have column titles like 'Custom Field 1', 'Custom Field 2', ...

 

The summation of these columns needs to be included within the dashboard as a KPI. If no columns titled "custom field" exist within the dataset, assume that the value is 0.

 

I tried a lot to search for wildcard in Power BI but that referred to search values in a particular column and not search column names in a particular table.

1 REPLY 1
Anonymous
Not applicable

i'm not sure i understood please provide woth some sample data if this doesnt work :

 

 

CALCULATE(count(table[column]),allexcept(table,table[custom fields]))

 

if this works please consider acceptig it as solution and kudos

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.