title: Pass a Parameter to DAX Query Report Builder
body: <p>I need some help here.  Below is a DAX query that I have copied over from Power BI into Power BI Report Builder. I'm looking to pass a parameter into this query for 'edw dim_paycom_amcs_location_xref'[Paycom_Location_Desc].  However, I'm not sure where to place it within the query. I've researched the heck out of this and no matter where I try to place it I receive errors. Can anyone help with this?  Thank you very much.</p>
  <pre><code>      // DAX Query
  DEFINE
    VAR __DS0FilterTable = 
      TREATAS({&quot;2021&quot;}, 'edw dimDate'[Year])
  
    VAR __DS0FilterTable2 = 
      TREATAS({&quot;August&quot;}, 'edw dimDate'[MonthName])
  
    VAR __DS0Core = 
      SUMMARIZECOLUMNS(
        'edw dimDate'[MonthYear],
        'edw dimDate'[Month],
        'edw dim_paycom_amcs_location_xref'[Paycom_Location_Desc],
        __DS0FilterTable,
        __DS0FilterTable2,
        &quot;SumOvertime_Hours_by_Day&quot;, CALCULATE(SUM('PaycomHours'[Overtime_Hours_by_Day])),
        &quot;SumReg_Hours_by_Day&quot;, CALCULATE(SUM('PaycomHours'[Reg_Hours_by_Day])),
        &quot;Transportation&quot;, 'PaycomHours'[Transportation],
        &quot;Total_Inbound_Tons&quot;, 'PaycomHours'[Total Inbound Tons],
        &quot;Total_Inbound_Tons__excl_Yakima_&quot;, 'PaycomHours'[Total Inbound Tons (excl Yakima)],
        &quot;No_Operating_Days&quot;, 'edw dimDate'[No.Operating Days],
        &quot;Tonnage_Inbound__3rd_Party&quot;, 'PaycomHours'[Tonnage Inbound- 3rd Party],
        &quot;Tonnage_Inbound__Intercompany&quot;, 'PaycomHours'[Tonnage Inbound- Intercompany],
        &quot;Tonnage_Inbound___3rd_Party_Metal&quot;, 'PaycomHours'[Tonnage Inbound - 3rd Party Metal],
        &quot;Tonnage___Intercompany_Metal&quot;, 'PaycomHours'[Tonnage - Intercompany Metal],
        &quot;Tonnage___Intercompany_Hog_Fuel&quot;, 'PaycomHours'[Tonnage - Intercompany Hog Fuel],
        &quot;Tonnage___3rd_Party_Hog_Fuel&quot;, 'PaycomHours'[Tonnage - 3rd Party Hog Fuel],
        &quot;Total_Commodities_Volume_Sold&quot;, 'PaycomHours'[Total Commodities Volume Sold],
        &quot;Tonnage___Intercompany_Cardboard&quot;, 'PaycomHours'[Tonnage - Intercompany Cardboard],
        &quot;Tonnage___Intercompany_ALL&quot;, 'PaycomHours'[Tonnage - Intercompany ALL],
        &quot;Tonnage___3rd_Party_ALL&quot;, 'PaycomHours'[Tonnage - 3rd Party ALL]
      )
  
    VAR __DS0PrimaryWindowed = 
      TOPN(
        501,
        __DS0Core,
        'edw dimDate'[Month],
        1,
        'edw dimDate'[MonthYear],
        1,
        'edw dim_paycom_amcs_location_xref'[Paycom_Location_Desc],
        1
      )
  
  EVALUATE
    __DS0PrimaryWindowed
  
  ORDER BY
    'edw dimDate'[Month],
    'edw dimDate'[MonthYear],
    'edw dim_paycom_amcs_location_xref'[Paycom_Location_Desc]
  </code></pre>