Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. 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.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
14 | |
9 | |
7 | |
7 | |
6 |
User | Count |
---|---|
21 | |
11 | |
10 | |
9 | |
8 |