Join 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!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
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?
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 20 | |
| 11 | |
| 10 | |
| 4 | |
| 4 |
| User | Count |
|---|---|
| 32 | |
| 28 | |
| 19 | |
| 11 | |
| 10 |