<?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: Power BI Dax - How to use a selected date value in a measure in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Power-BI-Dax-How-to-use-a-selected-date-value-in-a-measure/m-p/2685648#M80637</link>
    <description>&lt;P&gt;Hi Kim,&lt;/P&gt;&lt;P&gt;I accepted your answer as a solution for the first part of the question. Thank You.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For the 2nd part, (determine Fiscal Year from a calculated column) this post helped me.&amp;nbsp;&lt;A href="https://community.powerbi.com/t5/Desktop/Fiscal-Year-Calculated-Columns/m-p/150441#M65008" target="_blank"&gt;Solved: Re: Fiscal Year Calculated Columns - Microsoft Power BI Community&amp;nbsp;&amp;nbsp;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Good day.&lt;/P&gt;</description>
    <pubDate>Sun, 07 Aug 2022 16:32:28 GMT</pubDate>
    <dc:creator>AH2022</dc:creator>
    <dc:date>2022-08-07T16:32:28Z</dc:date>
    <item>
      <title>Power BI Dax - How to use a selected date value in a measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Power-BI-Dax-How-to-use-a-selected-date-value-in-a-measure/m-p/2685076#M80573</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to make a calculation based on a fiscal period. The code DAX for 22-23 (2022/04/01-2023/03/31)&amp;nbsp; &lt;EM&gt;works&lt;/EM&gt;.&lt;/P&gt;&lt;P&gt;&lt;EM&gt;NbreClientsContractNOTRenewed22-23 =&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;CALCULATE(&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;COUNT(TableClients[id]), FILTER(TableContracts, TableContracts[ContractsEndingOn(Future)]=0 &amp;amp;&amp;amp; TableContracts[ContractsEndingOn(Past)]&amp;lt;=DATE(2023,03,31) &amp;amp;&amp;amp;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;TableContracts [ContractsEndingOn (Past)]&amp;gt;=DATE(2022,04,01)))&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How can I write the code, and calculate &lt;U&gt;based on a fiscal period selected by the user , within a slicer?&lt;/U&gt;&lt;/P&gt;&lt;P&gt;User selects a FiscalYear (From a Slicer)&lt;/P&gt;&lt;P&gt;DimDate[Date] between&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;NbreClientsContractsNOTRenewed&lt;STRONG&gt;FYSelectedByUser&lt;/STRONG&gt; =&lt;/P&gt;&lt;P&gt;CALCULATE(&lt;/P&gt;&lt;P&gt;COUNT(TableClients[id]), FILTER(TableContracts, TableContracts[InstallmentsEndingOn(Future)]=0 &amp;amp;&amp;amp;&lt;/P&gt;&lt;P&gt;TableContracts[InstallmentsEndingOn(Past)]= &lt;STRONG&gt;FYSelectedByUser&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;//Calculates NbreClientsContracts finishing &lt;STRONG&gt;FY Selected By User&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Thank You.&lt;/P&gt;</description>
      <pubDate>Sat, 06 Aug 2022 06:02:32 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Power-BI-Dax-How-to-use-a-selected-date-value-in-a-measure/m-p/2685076#M80573</guid>
      <dc:creator>AH2022</dc:creator>
      <dc:date>2022-08-06T06:02:32Z</dc:date>
    </item>
    <item>
      <title>Re: Power BI Dax - How to use a selected date value in a measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Power-BI-Dax-How-to-use-a-selected-date-value-in-a-measure/m-p/2685084#M80576</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;Please try the below if it works.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;NbreClientsContractNOTRenewed22-23 =
VAR _minselecteddate =
    MIN ( Calendartable[Date] )
VAR _maxselecteddate =
    MAX ( Calendartable[Date] )
RETURN
    CALCULATE (
        COUNT ( TableClients[id] ),
        FILTER (
            TableContracts,
            TableContracts[ContractsEndingOn(Future)] = 0
                &amp;amp;&amp;amp; TableContracts[ContractsEndingOn(Past)] &amp;lt;= _maxselecteddate
                &amp;amp;&amp;amp; TableContracts[ContractsEndingOn (Past)] &amp;gt;= _minselecteddate
        )
    )
&lt;/LI-CODE&gt;</description>
      <pubDate>Sat, 06 Aug 2022 06:47:54 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Power-BI-Dax-How-to-use-a-selected-date-value-in-a-measure/m-p/2685084#M80576</guid>
      <dc:creator>Jihwan_Kim</dc:creator>
      <dc:date>2022-08-06T06:47:54Z</dc:date>
    </item>
    <item>
      <title>Re: Power BI Dax - How to use a selected date value in a measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Power-BI-Dax-How-to-use-a-selected-date-value-in-a-measure/m-p/2685224#M80589</link>
      <description>&lt;P&gt;Thank you&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="291628" data-lia-user-login="Jihwan_Kim" class="lia-mention lia-mention-user"&gt;Jihwan_Kim&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;I need to refine my question.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;ContractsEndingOn(Past)&lt;/STRONG&gt; is a calculated column.&lt;/P&gt;&lt;P&gt;The calculated column &lt;STRONG&gt;ContractsEndingOn(Past)&lt;/STRONG&gt; allows the user to specify the “fiscal period” within a slicer and keeps the implicit Filter of the report on the page.&amp;nbsp;Therefore, it filters my visual and the calculation of the respective number of customers is done according to the ContractsEndingOn(Past) ( “fiscal period” selected by the user.)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The problem arises when I want to make a table summarizing the number of clients who have renewed their contract, sorted by fiscal period.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Because a contract can be signed for example in 22-23 and can end in 26-27.&lt;/P&gt;&lt;P&gt;I need to display the fiscal period, based on the contract end date.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have this:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need to calculate the “Fiscal Year” based on the column TableContracts[ContractsEndingOn(Past)] :&lt;/P&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In summary, I need to create a &lt;STRONG&gt;fiscal year column (CalculatedColumn)&lt;/STRONG&gt; &amp;nbsp;&lt;STRONG&gt;from&lt;/STRONG&gt; another Date calculated column&amp;nbsp;&lt;STRONG&gt;TableContracts[ContractsEndingOn(Past)].&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;01/April/Year1 TO 31/March/Year2&amp;nbsp; returns Year1 – Year2&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;01/April/2022 TO 31/March/2023&lt;/STRONG&gt;&amp;nbsp; returns &lt;STRONG&gt;22-23&lt;/STRONG&gt; OR 2022-2023&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you !&lt;/P&gt;</description>
      <pubDate>Sat, 06 Aug 2022 15:49:06 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Power-BI-Dax-How-to-use-a-selected-date-value-in-a-measure/m-p/2685224#M80589</guid>
      <dc:creator>AH2022</dc:creator>
      <dc:date>2022-08-06T15:49:06Z</dc:date>
    </item>
    <item>
      <title>Re: Power BI Dax - How to use a selected date value in a measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Power-BI-Dax-How-to-use-a-selected-date-value-in-a-measure/m-p/2685477#M80609</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;Sorry that it is difficult to understand the problem.&lt;/P&gt;
&lt;P&gt;If it is OK with you, please share your sample pbix file's link and the expected outcome of the visualization, and then I can try to look into it to come up with a more accurate solution.&lt;/P&gt;
&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Sun, 07 Aug 2022 05:34:57 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Power-BI-Dax-How-to-use-a-selected-date-value-in-a-measure/m-p/2685477#M80609</guid>
      <dc:creator>Jihwan_Kim</dc:creator>
      <dc:date>2022-08-07T05:34:57Z</dc:date>
    </item>
    <item>
      <title>Re: Power BI Dax - How to use a selected date value in a measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Power-BI-Dax-How-to-use-a-selected-date-value-in-a-measure/m-p/2685648#M80637</link>
      <description>&lt;P&gt;Hi Kim,&lt;/P&gt;&lt;P&gt;I accepted your answer as a solution for the first part of the question. Thank You.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For the 2nd part, (determine Fiscal Year from a calculated column) this post helped me.&amp;nbsp;&lt;A href="https://community.powerbi.com/t5/Desktop/Fiscal-Year-Calculated-Columns/m-p/150441#M65008" target="_blank"&gt;Solved: Re: Fiscal Year Calculated Columns - Microsoft Power BI Community&amp;nbsp;&amp;nbsp;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Good day.&lt;/P&gt;</description>
      <pubDate>Sun, 07 Aug 2022 16:32:28 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Power-BI-Dax-How-to-use-a-selected-date-value-in-a-measure/m-p/2685648#M80637</guid>
      <dc:creator>AH2022</dc:creator>
      <dc:date>2022-08-07T16:32:28Z</dc:date>
    </item>
  </channel>
</rss>

