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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
darrylwjk
Frequent Visitor

Automating column creation process containing calculation based on data available

Hi, 

I was wondering is it possible to auto create a column containing calculated values instead of manually create a custom column to input the formula?

 

Example :

I upload a dataset into powerbi , power query formula can be ran to create a column with a name cost per pax and fill column with the calculation value based on 2 columns like total cost column divided by attendance count column to get cost per pax.

 

Would appreciate some advice on how to go about automating column creations and formulas in Powerbi thanks!

3 REPLIES 3
darrylwjk
Frequent Visitor

Let's say this is the data provided to be uploaded into powerbi. 

darrylwjk_0-1671262890028.png

Things I'm wondering if I can automate these in powerbi if possible:

1) Auto changing a data type if the data type is wrong.

2) Creating a column which contains a boolean to determine each record transaction date is weekday or weekend.

3) Create a column which determines if the record is a duplicate based on if there is 2 or more records with the 4 columns Employee , Expense Type , Expense Amount (reimbursement currency)  and transaction date being the same.

4) Create a column that calculates cost per pax which is just Expense Amount (reimbursement currency) / Number Of Pax

 

The Outcome would be this after all the above steps:

darrylwjk_1-1671262959165.png

 

serpiva64
Solution Sage
Solution Sage

Hi,

i think it is possible but you have to post some sample data and the result you want to achieve.

 

Hi I have posted something hope this helps!

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors