<?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: Create a dynamic column/measure/parameter based on date slicer in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Create-a-dynamic-column-measure-parameter-based-on-date-slicer/m-p/3617077#M139840</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="661017" data-lia-user-login="cjgreene" class="lia-mention lia-mention-user"&gt;cjgreene&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;My Date table sample:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can create a measure as follows.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Indicator = 
IF (
    SELECTEDVALUE ( 'Table'[assessment_ended] ) &amp;gt; MIN ( 'Date'[Date] )
        &amp;amp;&amp;amp; SELECTEDVALUE ( 'Table'[assessment_ended] ) = MAX ( 'Date'[Date] ) - 1,
    1,
    0
)&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;Is this the result you expect?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;BR /&gt;Community Support Team _Yuliax&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If this post &lt;STRONG&gt;helps, then please consider &lt;EM&gt;Accept it as the solution to help the other members find it more quickly.&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 12 Jan 2024 09:56:30 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2024-01-12T09:56:30Z</dc:date>
    <item>
      <title>Create a dynamic column/measure/parameter based on date slicer</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Create-a-dynamic-column-measure-parameter-based-on-date-slicer/m-p/3616553#M139826</link>
      <description>&lt;P class=""&gt;I have a dataset that stores information about cases and when they completed assessments:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;case_id&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;assessment_ended&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;1/1/23&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;1/4/23&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;1/6/23&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P class=""&gt;&amp;nbsp;&lt;/P&gt;&lt;P class=""&gt;Using a column, measure, or parameter, I need to create an "Indicator" that changes based on my date slicer. For example, If my date slicer is set to 1/1/2023 - 1/7/2023, I would want to see:&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;case_id&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;ended_at&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;Indicator&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;1/1/23&lt;/TD&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;1/4/23&lt;/TD&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;1/6/23&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P class=""&gt;&amp;nbsp;&lt;/P&gt;&lt;P class=""&gt;If I change my date slicer to 1/1/2023 - 1/5/2023, I would want to see:&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;case_id&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;ended_at&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;Indicator&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;1/1/23&lt;/TD&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;1/4/23&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;1/6/23&lt;/TD&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P class=""&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have seen some other posts that say calculated columns can not be dynamic. I am wondering anyone is aware of any alternative solutions. Any tips/suggestions are welcome&lt;/P&gt;</description>
      <pubDate>Thu, 04 Jan 2024 22:27:48 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Create-a-dynamic-column-measure-parameter-based-on-date-slicer/m-p/3616553#M139826</guid>
      <dc:creator>cjgreene</dc:creator>
      <dc:date>2024-01-04T22:27:48Z</dc:date>
    </item>
    <item>
      <title>Re: Create a dynamic column/measure/parameter based on date slicer</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Create-a-dynamic-column-measure-parameter-based-on-date-slicer/m-p/3616582#M139829</link>
      <description>&lt;P&gt;You can create an indicator measure that would work in a matrix or table visual, but you cannot have the actual data table in your model be responsive to slicers or filters (since they are not recalculated dynamically in response to report settings, only for data refreshes or other model updates).&lt;BR /&gt;&lt;BR /&gt;Such a measure might look something like this:&lt;/P&gt;
&lt;LI-CODE lang="php"&gt;Indicator =
VAR _Ended = SELECTEDVALUE ( Table1[assesment_ended] )
VAR _SelectedDates = VALUES ( DateSlicer[Date] )
RETURN
    IF ( _Ended IN _SelectedDates, 1, 0 )&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 04 Jan 2024 23:08:34 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Create-a-dynamic-column-measure-parameter-based-on-date-slicer/m-p/3616582#M139829</guid>
      <dc:creator>AlexisOlson</dc:creator>
      <dc:date>2024-01-04T23:08:34Z</dc:date>
    </item>
    <item>
      <title>Re: Create a dynamic column/measure/parameter based on date slicer</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Create-a-dynamic-column-measure-parameter-based-on-date-slicer/m-p/3617077#M139840</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="661017" data-lia-user-login="cjgreene" class="lia-mention lia-mention-user"&gt;cjgreene&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;My Date table sample:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can create a measure as follows.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Indicator = 
IF (
    SELECTEDVALUE ( 'Table'[assessment_ended] ) &amp;gt; MIN ( 'Date'[Date] )
        &amp;amp;&amp;amp; SELECTEDVALUE ( 'Table'[assessment_ended] ) = MAX ( 'Date'[Date] ) - 1,
    1,
    0
)&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;Is this the result you expect?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;BR /&gt;Community Support Team _Yuliax&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If this post &lt;STRONG&gt;helps, then please consider &lt;EM&gt;Accept it as the solution to help the other members find it more quickly.&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 12 Jan 2024 09:56:30 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Create-a-dynamic-column-measure-parameter-based-on-date-slicer/m-p/3617077#M139840</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-01-12T09:56:30Z</dc:date>
    </item>
  </channel>
</rss>

