<?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: Show dax measure only for Jan to Jun in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Show-dax-measure-only-for-Jan-to-Jun/m-p/2970997#M99286</link>
    <description>&lt;P&gt;Hello there &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="458931" data-lia-user-login="jinivthakkar" class="lia-mention lia-mention-user"&gt;jinivthakkar&lt;/a&gt;&amp;nbsp;! Try the following:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;MyMeasure3 =
SWITCH (
    TRUE (),
    MONTH ( SELECTEDVALUE( ref_Dates[Date] ) ) &amp;gt;= 1
        &amp;amp;&amp;amp; MONTH ( SELECTEDVALUE( ref_Dates[Date] ) ) &amp;lt;= 6, DIVIDE( MyMeasure1 , MyMeasure2 ),
    0
)&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For additional help, please &lt;SPAN&gt;@&lt;/SPAN&gt; me in your reply!&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://www.linkedin.com/in/gon%C3%A7alo-costa-b32253159" target="_blank"&gt;You can also check out my LinkedIn!&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Best regards,&lt;BR /&gt;Gonçalo Geraldes&lt;/P&gt;</description>
    <pubDate>Thu, 15 Dec 2022 14:13:32 GMT</pubDate>
    <dc:creator>goncalogeraldes</dc:creator>
    <dc:date>2022-12-15T14:13:32Z</dc:date>
    <item>
      <title>Show dax measure only for Jan to Jun</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Show-dax-measure-only-for-Jan-to-Jun/m-p/2970678#M99252</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a dax which is looks something like this and it is working fine&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;MyMeasure1 = CALCULATE(
    [Table],
    ref_Dates[Date] &amp;gt;= DATE(2022,1,1),
    ref_Dates[Date] &amp;lt;= DATE(2022,6,30)
)
MyMeasure2 = CALCULATE(
    [Table1],
    ref_Dates[Date] &amp;gt;= DATE(2022,1,1),
    ref_Dates[Date] &amp;lt;= DATE(2022,6,30)
)

MyMeasure3 = MyMeasure1/MyMeasure2&lt;/LI-CODE&gt;&lt;P&gt;&lt;SPAN&gt;I then use measure 1 and 2 in measure 3 and measure 3 is referred on the visuals and it shows a constant line from Jan to Dec which is as expected and correct but what I want to do is, show measure 3 value only from Jan to Jun and then 0 from Jul to Dec.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried adding If condition in measure 3 but it is giving me error.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please guide/help.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;TIA&lt;/P&gt;</description>
      <pubDate>Thu, 15 Dec 2022 11:55:18 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Show-dax-measure-only-for-Jan-to-Jun/m-p/2970678#M99252</guid>
      <dc:creator>jinivthakkar</dc:creator>
      <dc:date>2022-12-15T11:55:18Z</dc:date>
    </item>
    <item>
      <title>Re: Show dax measure only for Jan to Jun</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Show-dax-measure-only-for-Jan-to-Jun/m-p/2970760#M99258</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="458931" data-lia-user-login="jinivthakkar" class="lia-mention lia-mention-user"&gt;jinivthakkar&lt;/a&gt;&amp;nbsp;! You can try the following:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;MyMeasure3 =
SWITCH (
    TRUE (),
    MONTH ( ref_Dates[Date] ) &amp;gt;= 1
        &amp;amp;&amp;amp; MONTH ( ref_Dates[Date] ) &amp;lt;= 6, MyMeasure1 / MyMeasure2,
    0
)&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope this answer solves your problem!&lt;BR /&gt;If you need any additional help please &lt;SPAN&gt;@&lt;/SPAN&gt; me in your reply.&lt;BR /&gt;If my reply provided you with a solution, please consider marking it as a solution &lt;span class="lia-unicode-emoji" title=":heavy_check_mark:"&gt;✔️&lt;/span&gt; or giving it a kudoe &lt;span class="lia-unicode-emoji" title=":thumbs_up:"&gt;👍&lt;/span&gt;&lt;BR /&gt;Thanks!&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://www.linkedin.com/in/gon%C3%A7alo-costa-b32253159" target="_blank"&gt;You can also check out my LinkedIn!&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Best regards,&lt;BR /&gt;Gonçalo Geraldes&lt;/P&gt;</description>
      <pubDate>Thu, 15 Dec 2022 12:28:45 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Show-dax-measure-only-for-Jan-to-Jun/m-p/2970760#M99258</guid>
      <dc:creator>goncalogeraldes</dc:creator>
      <dc:date>2022-12-15T12:28:45Z</dc:date>
    </item>
    <item>
      <title>Re: Show dax measure only for Jan to Jun</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Show-dax-measure-only-for-Jan-to-Jun/m-p/2970865#M99269</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="301004" data-lia-user-login="goncalogeraldes" class="lia-mention lia-mention-user"&gt;goncalogeraldes&lt;/a&gt;&amp;nbsp;thanks for your reply but I am getting error Cannot find name '[Date]':&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;I also tried a few other ways but nothing seems to work, basically my tables are not populating in the measure.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;TIA&lt;/P&gt;</description>
      <pubDate>Thu, 15 Dec 2022 13:25:22 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Show-dax-measure-only-for-Jan-to-Jun/m-p/2970865#M99269</guid>
      <dc:creator>jinivthakkar</dc:creator>
      <dc:date>2022-12-15T13:25:22Z</dc:date>
    </item>
    <item>
      <title>Re: Show dax measure only for Jan to Jun</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Show-dax-measure-only-for-Jan-to-Jun/m-p/2970997#M99286</link>
      <description>&lt;P&gt;Hello there &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="458931" data-lia-user-login="jinivthakkar" class="lia-mention lia-mention-user"&gt;jinivthakkar&lt;/a&gt;&amp;nbsp;! Try the following:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;MyMeasure3 =
SWITCH (
    TRUE (),
    MONTH ( SELECTEDVALUE( ref_Dates[Date] ) ) &amp;gt;= 1
        &amp;amp;&amp;amp; MONTH ( SELECTEDVALUE( ref_Dates[Date] ) ) &amp;lt;= 6, DIVIDE( MyMeasure1 , MyMeasure2 ),
    0
)&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For additional help, please &lt;SPAN&gt;@&lt;/SPAN&gt; me in your reply!&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://www.linkedin.com/in/gon%C3%A7alo-costa-b32253159" target="_blank"&gt;You can also check out my LinkedIn!&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Best regards,&lt;BR /&gt;Gonçalo Geraldes&lt;/P&gt;</description>
      <pubDate>Thu, 15 Dec 2022 14:13:32 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Show-dax-measure-only-for-Jan-to-Jun/m-p/2970997#M99286</guid>
      <dc:creator>goncalogeraldes</dc:creator>
      <dc:date>2022-12-15T14:13:32Z</dc:date>
    </item>
    <item>
      <title>Re: Show dax measure only for Jan to Jun</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Show-dax-measure-only-for-Jan-to-Jun/m-p/2971023#M99289</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="301004" data-lia-user-login="goncalogeraldes" class="lia-mention lia-mention-user"&gt;goncalogeraldes&lt;/a&gt;&amp;nbsp;I tried&amp;nbsp; this but this gives me a flat line or value as 0, I am not sure if SELECTEDVALUE will work, end users dont have option to select month value.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I already have a bar and line chart and just need to show existing measure only from Jan to Jun without user interaction.&lt;/P&gt;</description>
      <pubDate>Thu, 15 Dec 2022 14:21:27 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Show-dax-measure-only-for-Jan-to-Jun/m-p/2971023#M99289</guid>
      <dc:creator>jinivthakkar</dc:creator>
      <dc:date>2022-12-15T14:21:27Z</dc:date>
    </item>
    <item>
      <title>Re: Show dax measure only for Jan to Jun</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Show-dax-measure-only-for-Jan-to-Jun/m-p/2971104#M99299</link>
      <description>&lt;P&gt;Hey there&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="458931" data-lia-user-login="jinivthakkar" class="lia-mention lia-mention-user"&gt;jinivthakkar&lt;/a&gt;&amp;nbsp;! In that case you can go with this:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;MyMeasure3 =
SWITCH (
    TRUE (),
    MONTH ( MAX( ref_Dates[Date] ) ) &amp;gt;= 1
        &amp;amp;&amp;amp; MONTH ( MAX( ref_Dates[Date] ) ) &amp;lt;= 6, DIVIDE( MyMeasure1 , MyMeasure2, 0 ),
    0
)&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For additional help, please &lt;SPAN&gt;@&lt;/SPAN&gt; me in your reply!&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://www.linkedin.com/in/gon%C3%A7alo-costa-b32253159" target="_blank"&gt;You can also check out my LinkedIn!&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Best regards,&lt;BR /&gt;Gonçalo Geraldes&lt;/P&gt;</description>
      <pubDate>Thu, 15 Dec 2022 14:41:07 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Show-dax-measure-only-for-Jan-to-Jun/m-p/2971104#M99299</guid>
      <dc:creator>goncalogeraldes</dc:creator>
      <dc:date>2022-12-15T14:41:07Z</dc:date>
    </item>
    <item>
      <title>Re: Show dax measure only for Jan to Jun</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Show-dax-measure-only-for-Jan-to-Jun/m-p/2971321#M99310</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="301004" data-lia-user-login="goncalogeraldes" class="lia-mention lia-mention-user"&gt;goncalogeraldes&lt;/a&gt;&amp;nbsp;Thanks buddy, cheers !!&lt;/P&gt;</description>
      <pubDate>Thu, 15 Dec 2022 16:06:04 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Show-dax-measure-only-for-Jan-to-Jun/m-p/2971321#M99310</guid>
      <dc:creator>jinivthakkar</dc:creator>
      <dc:date>2022-12-15T16:06:04Z</dc:date>
    </item>
  </channel>
</rss>

