# Database Discussions > Reporting Services >  syntax for using a parameter in a expression

## ncvandy

I am new to SSRS reporting and looking for some help in the correct syntax for using a parameter in an table expression
I have built a dataset query that pulls the deduction codes used for two different payroll runs and I need to compare the deduction amounts between the two pay periods.  My dataset query looks like this:

SELECT
  prpmdded.prpd_warr
  ,prpmdded.prpd_emp
  ,prpmdded.prpd_ded
  ,prpmdded.prpd_empe_amt
  ,prpmdded.prpd_empr_amt
  ,prpmdded.prpd_empr_taken
  ,prpmdded.prpd_amt_taken
FROM
  prpmdded
WHERE
  prpmdded.prpd_warr LIKE @prpd_warr OR prpmdded.prpd_warr LIKE @prpd_warr2

My parameters pull the proper results from the database,  For example the results for employee 118 and deduction code 2110 looks like 
prpd_warr prpd_emp   prpd-ded  prdp_empe_amt
142013     118             2110      58.39
152013     118             2110      60.05

What I am trying to do on the report side is to have a table that looks like:

Emp    Ded Code   AmtPP14                                                  AmtPP15
118    2110          =(Fields!prpd_empe_amt.Value) for PP14   =(Fields!prpd_empe_amt.Value) for PP15
which would show as 
118    2110          58.39                                                       60.05

I believe that you can use a paramater as a filter in an expression but I cannot seem to get the syntax correct.  Of if I am wrong and this cannot be done this way what would be the best way to approach it.
Thanks in advance

Jim

----------

