Forum

How to add a parame...
 
Notifications
Clear all

How to add a parameter into the table

5 Posts
2 Users
0 Reactions
1,060 Views
(@jshushnar)
Posts: 5
Active Member
Topic starter
 

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
 
Posted : 24/08/2019 2:01 pm
(@mynda)
Posts: 4761
Member Admin
 

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

 
Posted : 25/08/2019 4:19 am
(@jshushnar)
Posts: 5
Active Member
Topic starter
 

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

 
Posted : 27/08/2019 8:39 am
(@mynda)
Posts: 4761
Member Admin
 

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.png

 
Posted : 27/08/2019 8:43 pm
(@jshushnar)
Posts: 5
Active Member
Topic starter
 

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.

 
Posted : 28/08/2019 6:55 am
Share: