Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Currently, I have an input like below with hundreds of extra columns:
Country | ID | Initiative | Cost | mar-21 | apr-21 |
UK | 1 | 1 | 100 | 30 | 40 |
US | 2 | 2 | 150 | 12 | 11 |
IT | 3 | 2 | 20 | 14 | 11 |
How can I, without hard coding the current month (mar-21), identify the total per column which would be for UK = 30 and next month = 40? I need to create a new variable for current month.
Solved! Go to Solution.
That is a rather unfortunate table design. Have you considered unpivoting your month columns?
Unpivoting does the trick. Thank you!
That is a rather unfortunate table design. Have you considered unpivoting your month columns?
Check out the July 2025 Power BI update to learn about new features.
User | Count |
---|---|
24 | |
9 | |
7 | |
6 | |
6 |
User | Count |
---|---|
29 | |
11 | |
11 | |
10 | |
6 |