The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
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?
User | Count |
---|---|
28 | |
11 | |
8 | |
6 | |
5 |
User | Count |
---|---|
35 | |
14 | |
12 | |
9 | |
7 |