• Skip to main content
  • Skip to header right navigation
  • Skip to site footer

My Online Training Hub

Learn Dashboards, Excel, Power BI, Power Query, Power Pivot

  • Courses
  • Pricing
    • Free Courses
    • Power BI Course
    • Excel Power Query Course
    • Power Pivot and DAX Course
    • Excel Dashboard Course
    • Excel PivotTable Course – Quick Start
    • Advanced Excel Formulas Course
    • Excel Expert Advanced Excel Training
    • Excel Tables Course
    • Excel, Word, Outlook
    • Financial Modelling Course
    • Excel PivotTable Course
    • Excel for Customer Service Professionals
    • Excel for Operations Management Course
    • Excel for Decision Making Under Uncertainty Course
    • Excel for Finance Course
    • Excel Analysis ToolPak Course
    • Multi-User Pricing
  • Resources
    • Free Downloads
    • Excel Functions Explained
    • Excel Formulas
    • Excel Add-ins
    • IF Function
      • Excel IF Statement Explained
      • Excel IF AND OR Functions
      • IF Formula Builder
    • Time & Dates in Excel
      • Excel Date & Time
      • Calculating Time in Excel
      • Excel Time Calculation Tricks
      • Excel Date and Time Formatting
    • Excel Keyboard Shortcuts
    • Excel Custom Number Format Guide
    • Pivot Tables Guide
    • VLOOKUP Guide
    • ALT Codes
    • Excel VBA & Macros
    • Excel User Forms
    • VBA String Functions
  • Members
    • Login
    • Password Reset
  • Blog
  • Excel Webinars
  • Excel Forum
    • Register as Forum Member

Ho to add a regular formula into power querry?|Power Query|Excel Forum|My Online Training Hub

You are here: Home / Ho to add a regular formula into power querry?|Power Query|Excel Forum|My Online Training Hub
Avatar
sp_LogInOut Log In sp_Registration Register
sp_Search Search
Advanced Search
Search
Forum Scope




Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
sp_Search Search
sp_RankInfo
Lost password?
sp_CrumbsHome HomeExcel ForumPower QueryHo to add a regular formula into po…
sp_PrintTopic sp_TopicIcon
Ho to add a regular formula into power querry?
Avatar
thenewbee thenewbee
Member
Members
Level 0
Forum Posts: 21
Member Since:
January 12, 2021
sp_UserOfflineSmall Offline
1
January 25, 2021 - 12:50 am
sp_Permalink sp_Print

Hello,

 

is it possible, to add in power query an additional column, which works with an regular formula?

I would like to add a simple if else formular from values of one cell from next column on same leven and one cell below.

=C9<C8

sp_AnswersTopicSeeAnswer See Answer
Avatar
Mynda Treacy
Admin
Level 10
Forum Posts: 4443
Member Since:
July 16, 2010
sp_UserOfflineSmall Offline
2
January 25, 2021 - 11:08 am
sp_Permalink sp_Print

Welcome to our forum!

It's best not to add formulas to tables that are the output of queries as there's no guarantee they'll stay in alignment. Please upload a sample file showing what you want to do. We can then use that to show you how this is done with Power Query. 

Mynda

Avatar
thenewbee thenewbee
Member
Members
Level 0
Forum Posts: 21
Member Since:
January 12, 2021
sp_UserOfflineSmall Offline
3
January 26, 2021 - 7:02 am
sp_Permalink sp_Print

Hello Mynda , many thanks for your reply.

 

well, my challange based on this topic:

https://www.myonlinetraininghu.....same-table

 

Here I import data from an external source, and have a loop inside, which removes dublicate entries.

 

So, I got an table by power query, and try to add later on in the worksheet in column "G" the formula above. Theoretically it works, but now it´s somehow included into the "olddata" and in each refresh I get a new column.

I tried various ideas, without success, so I would like to include the formula somehow into the power query 🙂

trial2.PNGImage Enlarger

 

Thank you upfront, I´m sorry, I´m not an native English writer.

sp_PlupAttachments Attachments
  • sp_PlupImage trial2.PNG (27 KB)
Avatar
Mynda Treacy
Admin
Level 10
Forum Posts: 4443
Member Since:
July 16, 2010
sp_UserOfflineSmall Offline
4
January 26, 2021 - 9:58 am
sp_Permalink sp_Print

Hi and thanks for sharing your file.

The reason you are getting duplicates is because you're referencing the output table in the query itself, but I think you figured that out already. This is the incorrect way to reference the previous row, as you've found. You should be performing the formula in column G inside of Power Query. Please see this tutorial on using Power Query to reference the previous row - Option 2. 

From there you can perform the formula in column G inside Power Query.

Let me know if you get stuck.

Mynda

sp_AnswersTopicAnswer
Answers Post
Avatar
thenewbee thenewbee
Member
Members
Level 0
Forum Posts: 21
Member Since:
January 12, 2021
sp_UserOfflineSmall Offline
5
January 27, 2021 - 1:23 am
sp_Permalink sp_Print

Hello Mynda, many thanks for that.

 

I got it from your tutorial, it´s great in general (and the other tips, too). We expand the talbe and shift re results one above.

In Option 2, setap 6 , the third picture describes it perfect. Confused

Image Enlarger

 

Well, while I read this, I got also the idea, just to remove in my "olddata" the added column and this works too. (very simple according my previous triesConfused)

I belive, the better solution would be still, to have it inside of power query, but I think as long a I try various formulas, to get my result, I keep it outside as I´m more familar with standard formula.

 

Thanks a lot, also the whole tutorial archive was unknown yet 🙂

sp_Feed
Go to top
Forum Timezone: Australia/Brisbane
Most Users Ever Online: 245
Currently Online: Brian Pham, baber Tufail
Guest(s) 10
Currently Browsing this Page:
1 Guest(s)
Top Posters:
SunnyKow: 1432
Anders Sehlstedt: 870
Purfleet: 412
Frans Visser: 346
David_Ng: 306
lea cohen: 219
A.Maurizio: 202
Jessica Stewart: 202
Aye Mu: 201
jaryszek: 183
Newest Members:
drsven
Annie Witbrod
wahab tunde
Cong Le Duc
Faisal Bashir
Ivica Cvetkovski
Blaine Cox
Shankar Srinivasan
riyepa fdgf
Hannah Cave
Forum Stats:
Groups: 3
Forums: 24
Topics: 6205
Posts: 27211

 

Member Stats:
Guest Posters: 49
Members: 31880
Moderators: 3
Admins: 4
Administrators: Mynda Treacy, Philip Treacy, Catalin Bombea, FT
Moderators: MOTH Support, Velouria, Riny van Eekelen
© Simple:Press —sp_Information

Sidebar

Blog Categories

  • Excel
  • Excel Charts
  • Excel Dashboard
  • Excel Formulas
  • Excel PivotTables
  • Excel Shortcuts
  • Excel VBA
  • General Tips
  • Online Training
  • Outlook
  • Power Apps
  • Power Automate
  • Power BI
  • Power Pivot
  • Power Query
microsoft mvp logo
trustpilot excellent rating
Secured by Sucuri Badge
MyOnlineTrainingHub on YouTube Mynda Treacy on Linked In Mynda Treacy on Instagram Mynda Treacy on Twitter Mynda Treacy on Pinterest MyOnlineTrainingHub on Facebook
 

Company

  • About My Online Training Hub
  • Disclosure Statement
  • Frequently Asked Questions
  • Guarantee
  • Privacy Policy
  • Terms & Conditions
  • Testimonials
  • Become an Affiliate

Support

  • Contact
  • Forum
  • Helpdesk - For Technical Issues

Copyright © 2023 · My Online Training Hub · All Rights Reserved. Microsoft and the Microsoft Office logo are trademarks or registered trademarks of Microsoft Corporation in the United States and/or other countries. Product names, logos, brands, and other trademarks featured or referred to within this website are the property of their respective trademark holders.