Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.

Reply
mmkw123
Regular Visitor

Automatic creation of numerous colums (simple calculations)

Hi, 

 

Im very new to PowerBi and was wondering whether it is possible to automatically insert custom colums with automatic calculations. 

 

Background to my question is that I have to create incremental sums for >20 positions across 5 years each: column 2023 minus column 2022, 2024-2023 etc etc). While the process is very easy , it would take me hours to do so. In Excel I would fall back on VBA or macros but since I read that this is not possible in PowerBi I'd be interested in an alternative solution. 

 

Thanks a lot in advance 

2 REPLIES 2
ppm1
Solution Sage
Solution Sage

For this scenario, I would not create custom columns. You should be able to do all the analyses you need with DAX measures and a calendar table. If you do end needing to pre-calculate, I agree you should do so in an unpivoted way (you can pivot the data in your visuals as needed).

 

Pat

 

Microsoft Employee
ams1
Responsive Resident
Responsive Resident

Hi @mmkw123 

 

The solution to your problem is unpivot - just kidding! 😁 -> I think the community cannot help you (or at least me) without seeing some sample data, ex.: 1/ how does the input table look like, 2/ an example with an output table etc.

 

IMO the more details you provide, the more chances you have for an answer.

 

In case you provide sample data, please don't forget to remove confidential information from it!

 

#unpivotAnything 

Helpful resources

Announcements
Feb2025 Sticker Challenge

Join our Community Sticker Challenge 2025

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

Top Solution Authors
Top Kudoed Authors