Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredJoin 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.
Hi.
I have columns named "Units month 1", "Units month 2", ..., "Units month 12", which collect the sold units per month of my company.
I need to create a calculated measure based on the actual month; that is, if we're in March, I'd like the measure to use the column "Units month 3". The goal of this measure is to calculate the number of units sold during a month till a specific day, or even in the whole month.
Can I do this? Can I use the column names dynamically? What I'd like would be something like:
CALCULATE(
SUM("Units month "+MONTH(TODAY()))
)
Thanks.
Solved! Go to Solution.
It sounds like you have monthly data stored in separate columns. If so, you should unpivot those columns in the query and make your analysis much easier. Simple model, simple DAX.
If this works for you, please mark it as solution. Kudos are appreciated too. Please let me know if not.
Regards,
Pat
To learn more about Power BI, follow me on Twitter or subscribe on YouTube.
It sounds like you have monthly data stored in separate columns. If so, you should unpivot those columns in the query and make your analysis much easier. Simple model, simple DAX.
If this works for you, please mark it as solution. Kudos are appreciated too. Please let me know if not.
Regards,
Pat
To learn more about Power BI, follow me on Twitter or subscribe on YouTube.
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the October 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 11 | |
| 9 | |
| 8 | |
| 7 | |
| 7 |