• 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

How to add a parameter into the table|Power Query|Excel Forum|My Online Training Hub

You are here: Home / How to add a parameter into the table|Power Query|Excel Forum|My Online Training Hub
Avatar
sp_LogInOut Log In sp_Registration Register
sp_Search Search
Advanced Search|Last Search Results
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 QueryHow to add a parameter into the tab…
sp_PrintTopic sp_TopicIcon
How to add a parameter into the table
Avatar
Jenn Shushnar

Active Member
Members
Level 0
Forum Posts: 5
Member Since:
May 1, 2019
sp_UserOfflineSmall Offline
1
August 24, 2019 - 4:01 am
sp_Permalink sp_Print

Hi

I have a table X

I have a parameter that is a #of days  31 that needs to be entered every time we go into the query.

I would like to add that parameter into the table X so it can be used in calculations and such.  I think I want to do a table.addcolumn but can not find instructions except in BI and we do not use BI we only use query.

I thought at one point I had the syntax but kept getting comma erros and eof errors and just could not get it to work.  I want that Column one to have the value I entered into the parameter in it.  for this one 31 called column1 is fine. 

 

Can this be done in Power Query?

DATA_DATE BK DTE_INT_BEGIN NOTE_DTE DTE_LAST RPT_BR_NO LM_BR CM_NET_BAL LM_NET_BAL Last Characters Column1
7/1/2019 1 6/3/2019 0:00 5/22/2019 0:00 7/31/2019 0:00 151 151 5153437.5 5175000 17033 0
7/1/2019 1 3/1/2018 0:00 3/1/2018 0:00 7/31/2019 0:00 151 151 7280000 7312500 17033 0
7/1/2019 1 8/17/2011 0:00 8/16/2011 0:00 7/31/2019 0:00 151 151 184166.98 191250.31 17033 0
7/1/2019 1 7/20/2004 0:00 2/25/2019 0:00 6/13/2019 0:00 151 151 4345000 4345000 17033 0
7/1/2019 1 11/12/2002 0:00 11/7/2002 0:00 2/20/2019 0:00 151 151 610000 610000 17033 0
7/1/2019 1 1/28/2016 0:00 1/28/2016 0:00 7/3/2019 0:00 151 151 1082560.31 1088072.21 17033 0
7/1/2019 1 1/10/2017 0:00 1/10/2017 0:00 7/9/2019 0:00 955 955 37033.63 37346.9 17033 0
7/1/2019 1 11/9/2015 0:00 11/6/2015 0:00 7/6/2019 0:00 955 955 43166.31 43781.78 17033 0
Avatar
Mynda Treacy
Admin
Level 10
Forum Posts: 4449
Member Since:
July 16, 2010
sp_UserOfflineSmall Offline
2
August 24, 2019 - 6:19 pm
sp_Permalink sp_Print sp_EditHistory

Hi Jenn,

To add a column containing the number 31 on every row, simply go to Add Column > Custom Column > enter =31 > press OK.

Alternatively, if you want to add a 'Parameter' then you find these on the Home tab > Manage Parameters > New Parameter. The rest should be self-explanatory, but let us know if you get stuck.

Mynda

Avatar
Jenn Shushnar

Active Member
Members
Level 0
Forum Posts: 5
Member Since:
May 1, 2019
sp_UserOfflineSmall Offline
3
August 26, 2019 - 10:39 pm
sp_Permalink sp_Print

I don't think that's what I want to do.

 

I have a parameter named numofdays that has been inputted as 31.  I want to put that parameter where you have the 31.  Each month the user needs to enter a different number in that paramenter so I can use it in formulas.  So how do you get the parameter into that custom field?

 

Jenn

Avatar
Mynda Treacy
Admin
Level 10
Forum Posts: 4449
Member Since:
July 16, 2010
sp_UserOfflineSmall Offline
4
August 27, 2019 - 10:43 am
sp_Permalink sp_Print

Hi Jenn,

Sorry, I don't understand. You said "I want to put that parameter where you have the 31." Where who has the 31? I can't see it in your example.

That said, if you have created a parameter via the Manage Parameters > New Parameter menu then you can 'Add Conditional Column' and choose parameters from the 'Value' and 'Output' drop down lists. See screenshot.

If that doesn't help, then please upload a sample Excel file showing me where your parameter is and explaining where you want it to appear with reference to your example file so we can understand what you're trying to do.

Mynda

jenn_pq_parameters.pngImage Enlarger

sp_PlupAttachments Attachments
  • sp_PlupImage jenn_pq_parameters.png (19 KB)
Avatar
Jenn Shushnar

Active Member
Members
Level 0
Forum Posts: 5
Member Since:
May 1, 2019
sp_UserOfflineSmall Offline
5
August 27, 2019 - 8:55 pm
sp_Permalink sp_Print

Thanks that's what I needed to do.  I however had spaces in parameter name and it wasn't accepting it therefore I thought I was doing it wrong.

 

Spaces Bad!  lol

 

thanks for trying to help.

sp_Feed
Go to top
Forum Timezone: Australia/Brisbane
Most Users Ever Online: 245
Currently Online: Ayal Telem, Mark Stevens
Guest(s) 9
Currently Browsing this Page:
1 Guest(s)
Top Posters:
SunnyKow: 1432
Anders Sehlstedt: 871
Purfleet: 412
Frans Visser: 346
David_Ng: 306
lea cohen: 219
Jessica Stewart: 204
A.Maurizio: 202
Aye Mu: 201
jaryszek: 183
Newest Members:
Murat Hasanoglu
Brett Dryland
Saeed Aldousari
Bhuwan Devkota
Kathryn Patton
Maria Conatser
Jefferson Granemann
Glen Coulthard
Nikki Fox
Rachele Dickie
Forum Stats:
Groups: 3
Forums: 24
Topics: 6222
Posts: 27292

 

Member Stats:
Guest Posters: 49
Members: 31913
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.