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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Citah
Regular Visitor

Power bi Power Query

i have been using this formular

=[Headcount] / List.Sum("Changed Type"[Headcount])

to calculate my percentages in the old version of power bi but after updating power bi to the latest version, i get errors when using this. The following is an error i received

Citah_0-1652353410844.png

Kindly assist or advise, am on my deadlines and this percentage is stressful. Any steps to follow?

Kind Regards

 

5 REPLIES 5
v-kkf-msft
Community Support
Community Support

Hi @Citah ,

 

Please make sure you apply step "Changed Type" before adding the custom column.

 

vkkfmsft_0-1652691757216.png

 

If the problem is still not resolved, please provide detailed M code. Let me know immediately, looking forward to your reply.

Best Regards,
Winniz
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Thank you but the problem is still there

Citah_0-1652864825059.png

 

This is the code requested i believe;

= Table.AddColumn(Source, "Custom", each [QuestionTwoStars] / List.Sum(#"Changed Type"[QuestionTwoStars]))

 

Hi @Citah ,

 

Maybe you can try these code.

 

 

= Table.AddColumn(Source, "Custom", each [QuestionTwoStars] / List.Sum(Source[QuestionTwoStars]))

 

 

Or

 

= Table.AddColumn(#"Changed Type", "Custom", each [QuestionTwoStars] / List.Sum(#"Changed Type"[QuestionTwoStars]))

 

 

If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
Best Regards,
Winniz
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

amitchandak
Super User
Super User

@Citah , I think table name should have #

 

[Headcount] / List.Sum(#"Changed Type"[Headcount])

 

Power Query- List.Sum. Sum of a column in Power Query : https://youtu.be/Mud1RSqW5pw

I tried all that too...its actually the one that worked at first but now it shows and error

Citah_0-1652355536336.png

This is the error

Citah_1-1652355566010.png

 

 

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.