<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: User Input in DAX Query in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/User-Input-in-DAX-Query/m-p/3989590#M154683</link>
    <description>&lt;P&gt;I've taught 10s of thousands of people DAX. I've seen it all. Normally when I see this approach (DAX queries) it comes from someone that has a SQL background. Generally speaking, this is not how you should approach power BI. Instead do the following&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Prepare your data in a star schema&lt;/LI&gt;&lt;LI&gt;Load all the data you will need for all reports. You should never have to refresh the report based on different user data needs&lt;/LI&gt;&lt;LI&gt;add slicers to the page to apply filters&lt;/LI&gt;&lt;LI&gt;forget about writing queries. Instead use the visuals (start with table and matrix) to visually build the output you need. The visual creates the structure/group bys, etc, and measures are replacements for aggregations.&amp;nbsp;&lt;/LI&gt;&lt;/UL&gt;</description>
    <pubDate>Wed, 12 Jun 2024 21:05:33 GMT</pubDate>
    <dc:creator>MattAllington</dc:creator>
    <dc:date>2024-06-12T21:05:33Z</dc:date>
    <item>
      <title>User Input in DAX Query</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/User-Input-in-DAX-Query/m-p/3989179#M154622</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a project set up that is pulling in data from an accounting system.&amp;nbsp; Right now I am pulling in data for "2023_Scenario_1" which is hard coded in my DAX query.&amp;nbsp; I want to be able to have a user select this scenario and have it push that selection into this query.&amp;nbsp; I tried created a new paramater called"Selected Scenario" and I replaced the "2023_Scenario_1" below with&amp;nbsp;@Selected_Scenario but I got an error that this paramter wasn't declared.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;EVALUATE&lt;BR /&gt;SUMMARIZECOLUMNS (&lt;BR /&gt;'Organization'[Asset Final Desc],&lt;BR /&gt;'Organization'[Asset Desc],&lt;BR /&gt;'FactFinance'[DimCompanyID],&lt;BR /&gt;'FactFinance'[DimScenarioID],&lt;BR /&gt;'DateGL'[YYYYMM],&lt;BR /&gt;'FactFinance'[DimProductID],&lt;BR /&gt;'ProjectType'[Project Type Level 1 Name],&lt;BR /&gt;&lt;STRONG&gt;FILTER(FactFinance, FactFinance[DimScenarioID] IN {"2023_Scenario_1"}),&lt;/STRONG&gt;&lt;BR /&gt;FILTER(Versions, Versions[Versions] IN {"Final"}),&lt;BR /&gt;FILTER(DateGL, DateGL[YYYYMM] &amp;gt;= "202310"),&lt;BR /&gt;FILTER(DateGL, DateGL[Balance Type] IN {"Monthly Balance"}),&lt;BR /&gt;FILTER(GrossNet, GrossNet[Gross-Net] IN {"Net"}),&lt;BR /&gt;"Total Expense", [Total Expense],&lt;BR /&gt;"Revenue", [Revenue],&lt;BR /&gt;"Royalties", [Royalties],&lt;BR /&gt;)&lt;/P&gt;</description>
      <pubDate>Wed, 12 Jun 2024 16:22:04 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/User-Input-in-DAX-Query/m-p/3989179#M154622</guid>
      <dc:creator>Hurshemar</dc:creator>
      <dc:date>2024-06-12T16:22:04Z</dc:date>
    </item>
    <item>
      <title>Re: User Input in DAX Query</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/User-Input-in-DAX-Query/m-p/3989590#M154683</link>
      <description>&lt;P&gt;I've taught 10s of thousands of people DAX. I've seen it all. Normally when I see this approach (DAX queries) it comes from someone that has a SQL background. Generally speaking, this is not how you should approach power BI. Instead do the following&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Prepare your data in a star schema&lt;/LI&gt;&lt;LI&gt;Load all the data you will need for all reports. You should never have to refresh the report based on different user data needs&lt;/LI&gt;&lt;LI&gt;add slicers to the page to apply filters&lt;/LI&gt;&lt;LI&gt;forget about writing queries. Instead use the visuals (start with table and matrix) to visually build the output you need. The visual creates the structure/group bys, etc, and measures are replacements for aggregations.&amp;nbsp;&lt;/LI&gt;&lt;/UL&gt;</description>
      <pubDate>Wed, 12 Jun 2024 21:05:33 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/User-Input-in-DAX-Query/m-p/3989590#M154683</guid>
      <dc:creator>MattAllington</dc:creator>
      <dc:date>2024-06-12T21:05:33Z</dc:date>
    </item>
  </channel>
</rss>

