<?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 a date formula with a visual filter in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Changing-a-date-formula-with-a-visual-filter/m-p/3018703#M102616</link>
    <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/LI-USER&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;What you are trying to create is a calculated column? I&lt;SPAN&gt;f what you created is a &lt;STRONG&gt;calculated column&lt;/STRONG&gt;, it&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt; will not&lt;/STRONG&gt; &lt;/FONT&gt;change according to the user interaction(slicer, &lt;FONT color="#000000"&gt;filter&lt;/FONT&gt;, column selections etc.) in the report&amp;nbsp;as&amp;nbsp;the value of a calculated column is computed during data refresh and uses the current row as a context... Please review the following links about the difference of calculated column and measure...&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;A title="https://nam06.safelinks.protection.outlook.com/?url=https%3a%2f%2fwww.sqlbi.com%2farticles%2fcalculated-columns-and-measures-in-dax%2f&amp;amp;data=04%7c01%7cv-yiruan%40microsoft.com%7c6c82a3be2f13483c8c8408d9625c1586%7c72f988bf86f141af91ab2d7cd011db47%7c1%7c0%7c" href="https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.sqlbi.com%2Farticles%2Fcalculated-columns-and-measures-in-dax%2F&amp;amp;data=05%7C01%7Cv-yiruan%40microsoft.com%7C47501b2791274ba4ce7f08daac36231b%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C638011645794920964%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&amp;amp;sdata=tpzBtLc%2BWKFlXJ5Rvb7%2F2SlxkH6RqwxjkRqM5HpoEvE%3D&amp;amp;reserved=0" target="_blank" rel="noopener"&gt;Calculated Columns and Measures in DAX&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;A title="https://nam06.safelinks.protection.outlook.com/?url=https%3a%2f%2finsightsoftware.com%2fblog%2fcalculated-columns-vs-measures%2f&amp;amp;data=04%7c01%7cv-yiruan%40microsoft.com%7c6c82a3be2f13483c8c8408d9625c1586%7c72f988bf86f141af91ab2d7cd011db47%7c1%7c0%7c637648" href="https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Finsightsoftware.com%2Fblog%2Fcalculated-columns-vs-measures%2F&amp;amp;data=05%7C01%7Cv-yiruan%40microsoft.com%7C47501b2791274ba4ce7f08daac36231b%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C638011645795077626%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&amp;amp;sdata=USs9jrN8c%2BCLqr%2F%2F%2B0L9g%2Fddqbm62ImvgJc0RQGucJI%3D&amp;amp;reserved=0" target="_blank" rel="noopener" aria-label="Link Calculated Columns vs Measures"&gt;Calculated Columns vs Measures&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;I created a sample pbix file(see&amp;nbsp;&lt;STRONG&gt;the attachment&lt;/STRONG&gt;), please check if that is what you want.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;1. Create a slicer using &lt;STRONG&gt;[Date]&lt;/STRONG&gt; field of '&lt;STRONG&gt;Calendar&lt;/STRONG&gt;' table&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;2. Create a &lt;STRONG&gt;measure&lt;/STRONG&gt; as below to get the dynamic Difference Days by the filter/slicer... &lt;/SPAN&gt;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Difference Days to Overdue = 
IF (
    SELECTEDVALUE ( 'Table'[Progress] ) = "Finished",
    BLANK (),
    DATEDIFF (
        SELECTEDVALUE ('Table'[Due Date (DD/MM/YYYY)] ),
        MIN ( 'Calendar'[Date] ),
        DAY
    )
)&lt;/LI-CODE&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Best Regards&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 13 Jan 2023 08:42:11 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2023-01-13T08:42:11Z</dc:date>
    <item>
      <title>Changing a date formula with a visual filter</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Changing-a-date-formula-with-a-visual-filter/m-p/3016453#M102451</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to change this formular by a visual filter:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Difference Days to Overdue = &lt;/SPAN&gt;&lt;SPAN&gt;IF&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;[Progress]&lt;/SPAN&gt;&lt;SPAN&gt; = &lt;/SPAN&gt;&lt;SPAN&gt;"Finished"&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;BLANK&lt;/SPAN&gt;&lt;SPAN&gt;(),&lt;/SPAN&gt;&lt;SPAN&gt;DATEDIFF&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;[Due Date (DD/MM/YYYY)]&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;FONT color="#FF0000"&gt;&lt;SPAN&gt;MIN&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'Calendar'&lt;/SPAN&gt;&lt;SPAN&gt;[Date]&lt;/SPAN&gt;&lt;/FONT&gt;&lt;SPAN&gt;&lt;FONT color="#FF0000"&gt;)&lt;/FONT&gt; ,&lt;/SPAN&gt;&lt;SPAN&gt;DAY&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;The one marked in red should be a selectable value from the created table Calendar. I want a visual filter where you can select a certain range and then the minimum of this range is selected.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;When I currently insert a visual filter of Calendar[Date] into my report page, the formula does not filter with.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Thanks in Advantage.&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 12 Jan 2023 10:20:22 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Changing-a-date-formula-with-a-visual-filter/m-p/3016453#M102451</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-01-12T10:20:22Z</dc:date>
    </item>
    <item>
      <title>Re: Changing a date formula with a visual filter</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Changing-a-date-formula-with-a-visual-filter/m-p/3016606#M102459</link>
      <description>&lt;P&gt;Anonymous&lt;/LI-USER&gt; , Then you have create a measure &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;example&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;DIV&gt;&lt;SPAN&gt;Difference Days to Overdue = Sumx(Table, &lt;/SPAN&gt;&lt;SPAN&gt;IF&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;[Progress]&lt;/SPAN&gt;&lt;SPAN&gt; = &lt;/SPAN&gt;&lt;SPAN&gt;"Finished"&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;BLANK&lt;/SPAN&gt;&lt;SPAN&gt;(),&lt;/SPAN&gt;&lt;SPAN&gt;DATEDIFF&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;[Due Date (DD/MM/YYYY)]&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;FONT color="#FF0000"&gt;&lt;SPAN&gt;MIN&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'Calendar'&lt;/SPAN&gt;&lt;SPAN&gt;[Date]&lt;/SPAN&gt;&lt;/FONT&gt;&lt;SPAN&gt;&lt;FONT color="#FF0000"&gt;)&lt;/FONT&gt; ,&lt;/SPAN&gt;&lt;SPAN&gt;DAY&lt;/SPAN&gt;&lt;SPAN&gt;)) )&lt;BR /&gt;&lt;/SPAN&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 12 Jan 2023 11:45:36 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Changing-a-date-formula-with-a-visual-filter/m-p/3016606#M102459</guid>
      <dc:creator>amitchandak</dc:creator>
      <dc:date>2023-01-12T11:45:36Z</dc:date>
    </item>
    <item>
      <title>Re: Changing a date formula with a visual filter</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Changing-a-date-formula-with-a-visual-filter/m-p/3018703#M102616</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/LI-USER&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;What you are trying to create is a calculated column? I&lt;SPAN&gt;f what you created is a &lt;STRONG&gt;calculated column&lt;/STRONG&gt;, it&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt; will not&lt;/STRONG&gt; &lt;/FONT&gt;change according to the user interaction(slicer, &lt;FONT color="#000000"&gt;filter&lt;/FONT&gt;, column selections etc.) in the report&amp;nbsp;as&amp;nbsp;the value of a calculated column is computed during data refresh and uses the current row as a context... Please review the following links about the difference of calculated column and measure...&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;A title="https://nam06.safelinks.protection.outlook.com/?url=https%3a%2f%2fwww.sqlbi.com%2farticles%2fcalculated-columns-and-measures-in-dax%2f&amp;amp;data=04%7c01%7cv-yiruan%40microsoft.com%7c6c82a3be2f13483c8c8408d9625c1586%7c72f988bf86f141af91ab2d7cd011db47%7c1%7c0%7c" href="https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.sqlbi.com%2Farticles%2Fcalculated-columns-and-measures-in-dax%2F&amp;amp;data=05%7C01%7Cv-yiruan%40microsoft.com%7C47501b2791274ba4ce7f08daac36231b%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C638011645794920964%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&amp;amp;sdata=tpzBtLc%2BWKFlXJ5Rvb7%2F2SlxkH6RqwxjkRqM5HpoEvE%3D&amp;amp;reserved=0" target="_blank" rel="noopener"&gt;Calculated Columns and Measures in DAX&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;A title="https://nam06.safelinks.protection.outlook.com/?url=https%3a%2f%2finsightsoftware.com%2fblog%2fcalculated-columns-vs-measures%2f&amp;amp;data=04%7c01%7cv-yiruan%40microsoft.com%7c6c82a3be2f13483c8c8408d9625c1586%7c72f988bf86f141af91ab2d7cd011db47%7c1%7c0%7c637648" href="https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Finsightsoftware.com%2Fblog%2Fcalculated-columns-vs-measures%2F&amp;amp;data=05%7C01%7Cv-yiruan%40microsoft.com%7C47501b2791274ba4ce7f08daac36231b%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C638011645795077626%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&amp;amp;sdata=USs9jrN8c%2BCLqr%2F%2F%2B0L9g%2Fddqbm62ImvgJc0RQGucJI%3D&amp;amp;reserved=0" target="_blank" rel="noopener" aria-label="Link Calculated Columns vs Measures"&gt;Calculated Columns vs Measures&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;I created a sample pbix file(see&amp;nbsp;&lt;STRONG&gt;the attachment&lt;/STRONG&gt;), please check if that is what you want.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;1. Create a slicer using &lt;STRONG&gt;[Date]&lt;/STRONG&gt; field of '&lt;STRONG&gt;Calendar&lt;/STRONG&gt;' table&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;2. Create a &lt;STRONG&gt;measure&lt;/STRONG&gt; as below to get the dynamic Difference Days by the filter/slicer... &lt;/SPAN&gt;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Difference Days to Overdue = 
IF (
    SELECTEDVALUE ( 'Table'[Progress] ) = "Finished",
    BLANK (),
    DATEDIFF (
        SELECTEDVALUE ('Table'[Due Date (DD/MM/YYYY)] ),
        MIN ( 'Calendar'[Date] ),
        DAY
    )
)&lt;/LI-CODE&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Best Regards&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 13 Jan 2023 08:42:11 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Changing-a-date-formula-with-a-visual-filter/m-p/3018703#M102616</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-01-13T08:42:11Z</dc:date>
    </item>
  </channel>
</rss>

