<?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: Changing Filtered Field Dynamically in Dax in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Changing-Filtered-Field-Dynamically-in-Dax/m-p/2985913#M100211</link>
    <description>&lt;P&gt;Thank you so much for your answer and efford.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I can't use field parameter because I will not use&amp;nbsp;&lt;STRONG&gt;create_date&amp;nbsp;&lt;/STRONG&gt;and&amp;nbsp;&lt;STRONG&gt;start_date&amp;nbsp;&lt;/STRONG&gt;as dimension. I will put Country, City or other fields as dimensions and want to show&amp;nbsp;&lt;STRONG&gt;how many appointments created 12th December 2022&lt;/STRONG&gt;&amp;nbsp; and&amp;nbsp;&lt;STRONG&gt;how many appointments started on the same day&amp;nbsp;&lt;/STRONG&gt;based on used dimensions.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;That is why I definitaley need to change dax formula dynamically. This is easy to do in Qlik but I couldn't find a way to do it in PowerBI.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&amp;nbsp;&lt;/P&gt;&lt;P&gt;Oguz&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 23 Dec 2022 08:00:45 GMT</pubDate>
    <dc:creator>boraJustmop</dc:creator>
    <dc:date>2022-12-23T08:00:45Z</dc:date>
    <item>
      <title>Changing Filtered Field Dynamically in Dax</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Changing-Filtered-Field-Dynamically-in-Dax/m-p/2984782#M100129</link>
      <description>&lt;P&gt;Hi ,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I'm having a problem that I have been trying to solve for a while. I ve been keep searching for the solution but&amp;nbsp;I m not sure if there is a solution.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Let's go through from a simple example. Consider that;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;SPAN&gt;I have 1 Appointment Table, 3 fields&amp;nbsp; ; &lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;OL&gt;&lt;LI&gt;&lt;SPAN&gt;Appointment Start Date&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;Appointment Create Date&lt;/LI&gt;&lt;LI&gt;Appointment ID&lt;/LI&gt;&lt;/OL&gt;&lt;UL&gt;&lt;LI&gt;Metric : Distinct count of appointment IDs&lt;/LI&gt;&lt;LI&gt;lets assume that we filtered "create date" in dax and only showing value for 12th December 2022&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;I need to change the dax formula &lt;STRONG&gt;dynamically&lt;/STRONG&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;STRONG&gt;from&lt;/STRONG&gt;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;CALCULATE&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;[Bookings Completed #]&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;Appointment&lt;/STRONG&gt;&lt;SPAN&gt;[&lt;STRONG&gt;dim_created_date&lt;/STRONG&gt;]&lt;/SPAN&gt;&lt;/FONT&gt;&lt;SPAN&gt;=&lt;/SPAN&gt;&lt;SPAN&gt;datevalue&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;"12/21/2022"&lt;/SPAN&gt;&lt;SPAN&gt;))&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;STRONG&gt;to&amp;nbsp;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN&gt;CALCULATE&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;[Bookings Completed #]&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;&lt;SPAN&gt;Appointment&lt;/SPAN&gt;&lt;SPAN&gt;[dim_start_date]&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;SPAN&gt;=&lt;/SPAN&gt;&lt;SPAN&gt;datevalue&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;"12/21/2022"&lt;/SPAN&gt;&lt;SPAN&gt;))&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;to change the date field dynamically I have created a field and a variable as below. When I make a selection &lt;STRONG&gt;vCalendarField&lt;/STRONG&gt; works exactly as I want.&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;img /&gt;.............................&lt;img /&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&amp;nbsp;After those steps, I 'm able to change &lt;STRONG&gt;vCalendarfield&lt;/STRONG&gt; as I want,&amp;nbsp;&lt;STRONG&gt;dim_start_date&lt;/STRONG&gt; or &lt;STRONG&gt;dim_create_date&lt;/STRONG&gt;&lt;/LI&gt;&lt;LI&gt;Then last step; I want to use &lt;STRONG&gt;vCalendarField&lt;/STRONG&gt; in Dax as below but I m getting an error.&amp;nbsp;&lt;/LI&gt;&lt;LI&gt;&lt;img /&gt;&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;One last thing,&lt;/STRONG&gt; I have apporixametly 100 measures. That is why I dont want to create metrics for both&amp;nbsp;&lt;STRONG&gt;dim_create_date&amp;nbsp;&lt;/STRONG&gt;and&amp;nbsp;&lt;STRONG&gt;dim_start_date.&lt;/STRONG&gt; So that is why I can't use parameter method.&amp;nbsp;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;I just need to change the filtered field in dax dynamicaly using a dynamic variable. Does something like this doable in PowerBI?&lt;/P&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is the drive link of original document.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://drive.google.com/file/d/1Vv22OvBE1szkuWDbk6Uy77wGW9VmCJ83/view?usp=sharing" target="_blank"&gt;https://drive.google.com/file/d/1Vv22OvBE1szkuWDbk6Uy77wGW9VmCJ83/view?usp=sharing&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Fri, 23 Dec 2022 08:03:50 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Changing-Filtered-Field-Dynamically-in-Dax/m-p/2984782#M100129</guid>
      <dc:creator>boraJustmop</dc:creator>
      <dc:date>2022-12-23T08:03:50Z</dc:date>
    </item>
    <item>
      <title>Re: Changing Filtered Field Dynamically in Dax</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Changing-Filtered-Field-Dynamically-in-Dax/m-p/2985493#M100168</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="178025" data-lia-user-login="boraJustmop" class="lia-mention lia-mention-user"&gt;boraJustmop&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Have you ever considered about field parameter?&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Field parameters allow users to dynamically change the measures or dimensions being analyzed within a report. This feature can help your report readers explore and customize the analysis of the report by selecting the different measures or dimensions they're interested in.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Here is my sample:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;First create a field parameter:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;Then create a new table visual:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;Final output:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P style="background: white; margin: 7.5pt 0in 0in 0in;"&gt;&lt;SPAN&gt;Best Regards,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="background: white; margin: 7.5pt 0in 0in 0in;"&gt;&lt;SPAN&gt;Jianbo Li&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="background: white; margin: 7.5pt 0in 0in 0in;"&gt;&lt;SPAN&gt;If this post&amp;nbsp;&lt;STRONG&gt;&lt;I&gt;helps&lt;/I&gt;&lt;/STRONG&gt;, then please consider&amp;nbsp;&lt;STRONG&gt;&lt;I&gt;Accept it as the solution&lt;/I&gt;&lt;/STRONG&gt;&amp;nbsp;to help the other members find it more quickly.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 23 Dec 2022 01:58:55 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Changing-Filtered-Field-Dynamically-in-Dax/m-p/2985493#M100168</guid>
      <dc:creator>v-jianboli-msft</dc:creator>
      <dc:date>2022-12-23T01:58:55Z</dc:date>
    </item>
    <item>
      <title>Re: Changing Filtered Field Dynamically in Dax</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Changing-Filtered-Field-Dynamically-in-Dax/m-p/2985913#M100211</link>
      <description>&lt;P&gt;Thank you so much for your answer and efford.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I can't use field parameter because I will not use&amp;nbsp;&lt;STRONG&gt;create_date&amp;nbsp;&lt;/STRONG&gt;and&amp;nbsp;&lt;STRONG&gt;start_date&amp;nbsp;&lt;/STRONG&gt;as dimension. I will put Country, City or other fields as dimensions and want to show&amp;nbsp;&lt;STRONG&gt;how many appointments created 12th December 2022&lt;/STRONG&gt;&amp;nbsp; and&amp;nbsp;&lt;STRONG&gt;how many appointments started on the same day&amp;nbsp;&lt;/STRONG&gt;based on used dimensions.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;That is why I definitaley need to change dax formula dynamically. This is easy to do in Qlik but I couldn't find a way to do it in PowerBI.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&amp;nbsp;&lt;/P&gt;&lt;P&gt;Oguz&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 23 Dec 2022 08:00:45 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Changing-Filtered-Field-Dynamically-in-Dax/m-p/2985913#M100211</guid>
      <dc:creator>boraJustmop</dc:creator>
      <dc:date>2022-12-23T08:00:45Z</dc:date>
    </item>
  </channel>
</rss>

