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! Learn more

Reply
Sogeking
New Member

Dynamic column name in measure

Hello,

 

I have the following table with accounts and value for each month of the fiscal year. Data is in French, but the problems is the same : I want to create monthly measures, where I need to ping each column in turn.

 

Capture.PNG

 

For example, I want the measure A as the sum of accounts 101300 and 104100. I would then have to create a measure per column, which is not ideal. My aim is to have a dynamic column name and a single measure that goes something like :

 

CALCULATE(SUM([Month]);Accounts="101300").

 

Do you have any clues ?

 

Thanks

1 REPLY 1
Anonymous
Not applicable

HI @Sogeking,

 

AFAIK,power bi not support dynamic column name to use in dax formula.

 

I'd like to suggest you to use below formula, it can get current all selected rows from current table, so you can create different slicers to make result dynamic.

result =
CALCULATE ( SUM ( [Month] ); ALLSELECTED ( Table ) )

 

Regards,

Xiaoxin Sheng

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.

Top Solution Authors