<?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 Measure Not Working on Line Chart Y-Axis Maximum in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-Not-Working-on-Line-Chart-Y-Axis-Maximum/m-p/4664279#M178630</link>
    <description>&lt;P class=""&gt;Hi Power BI Experts, I could use some help with a DAX and visual interaction issue:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P class=""&gt;I'm trying to create a dynamic Y-axis maximum for a line chart that responds to different levels of date granularity. Here's the measure I created:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P class=""&gt;&amp;nbsp;&lt;/P&gt;&lt;P class=""&gt;The intention is to return a different maximum value based on the current date level selected via bookmark navigation (week, month, or year).&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;BR /&gt;When I use this measure in a matrix visual, it works perfectly—returning the expected values when switching between date levels using the bookmark navigator.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P class=""&gt;However, when I try to apply this same measure to the &lt;STRONG&gt;Y-axis Maximum range&lt;/STRONG&gt; via Conditional Formatting on a &lt;STRONG&gt;line chart&lt;/STRONG&gt;, it doesn’t respond at all. The value remains static, regardless of which date granularity is selected.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P class=""&gt;Has anyone encountered this before? Is there a limitation with Conditional Formatting on axis properties in charts?&lt;/P&gt;&lt;P class=""&gt;&lt;BR /&gt;You can download a sample of my power BI report in this link below:&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://drive.google.com/file/d/1PNr_YBySL6FxNSUZMji1lqB23oLzjJw4/view?usp=sharing" target="_blank" rel="noopener"&gt;https://drive.google.com/file/d/1PNr_YBySL6FxNSUZMji1lqB23oLzjJw4/view?usp=sharing&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Appreciate any insights!&lt;/P&gt;</description>
    <pubDate>Wed, 23 Apr 2025 05:59:18 GMT</pubDate>
    <dc:creator>Cabbage_Baby</dc:creator>
    <dc:date>2025-04-23T05:59:18Z</dc:date>
    <item>
      <title>Measure Not Working on Line Chart Y-Axis Maximum</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-Not-Working-on-Line-Chart-Y-Axis-Maximum/m-p/4664279#M178630</link>
      <description>&lt;P class=""&gt;Hi Power BI Experts, I could use some help with a DAX and visual interaction issue:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P class=""&gt;I'm trying to create a dynamic Y-axis maximum for a line chart that responds to different levels of date granularity. Here's the measure I created:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P class=""&gt;&amp;nbsp;&lt;/P&gt;&lt;P class=""&gt;The intention is to return a different maximum value based on the current date level selected via bookmark navigation (week, month, or year).&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;BR /&gt;When I use this measure in a matrix visual, it works perfectly—returning the expected values when switching between date levels using the bookmark navigator.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P class=""&gt;However, when I try to apply this same measure to the &lt;STRONG&gt;Y-axis Maximum range&lt;/STRONG&gt; via Conditional Formatting on a &lt;STRONG&gt;line chart&lt;/STRONG&gt;, it doesn’t respond at all. The value remains static, regardless of which date granularity is selected.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P class=""&gt;Has anyone encountered this before? Is there a limitation with Conditional Formatting on axis properties in charts?&lt;/P&gt;&lt;P class=""&gt;&lt;BR /&gt;You can download a sample of my power BI report in this link below:&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://drive.google.com/file/d/1PNr_YBySL6FxNSUZMji1lqB23oLzjJw4/view?usp=sharing" target="_blank" rel="noopener"&gt;https://drive.google.com/file/d/1PNr_YBySL6FxNSUZMji1lqB23oLzjJw4/view?usp=sharing&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Appreciate any insights!&lt;/P&gt;</description>
      <pubDate>Wed, 23 Apr 2025 05:59:18 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-Not-Working-on-Line-Chart-Y-Axis-Maximum/m-p/4664279#M178630</guid>
      <dc:creator>Cabbage_Baby</dc:creator>
      <dc:date>2025-04-23T05:59:18Z</dc:date>
    </item>
    <item>
      <title>Re: Measure Not Working on Line Chart Y-Axis Maximum</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-Not-Working-on-Line-Chart-Y-Axis-Maximum/m-p/4681028#M179292</link>
      <description>&lt;P&gt;Hi &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="836871" data-lia-user-login="Cabbage_Baby" class="lia-mention lia-mention-user"&gt;Cabbage_Baby&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;I recommend using a &lt;A href="https://www.sqlbi.com/articles/fields-parameters-in-power-bi/" target="_blank" rel="noopener"&gt;field parameter&lt;/A&gt;&amp;nbsp;for selection of Week/Month/Year rather than bookmarks.&lt;/P&gt;
&lt;P&gt;You can then retrieve the selected field parameter within the &lt;CODE&gt;Max Y-Axis&lt;/CODE&gt; measures.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The problem with the bookmark method is that, at the "visual level" where the &lt;CODE&gt;Max Y-Axis&lt;/CODE&gt; measure is evaluated, &lt;CODE&gt;ISINSCOPE ( ... )&lt;/CODE&gt; will always return false because there is no "hierarchy of levels" in that context. The hierarchy levels only exist for measures that are grouped by the axis fields, which is why the measure works in the matrix visual.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;As an example, I created a field parameter called&amp;nbsp;&lt;CODE&gt;Date Parameter&lt;/CODE&gt;and edited the calculated table expression slightly:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Date Parameter = 
{
    ( "Week", NAMEOF ( Calendar_Lookup[Start of Week] ), 0 ),
    ( "Month", NAMEOF ( Calendar_Lookup[Start of Month] ), 1 ),
    ( "Year", NAMEOF ( Calendar_Lookup[Start of Year] ), 2 )
}&lt;/LI-CODE&gt;
&lt;P&gt;Then updated Max Y-Axis to:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Max Y-Axis = 
VAR SelectedDateParameter =
    IF (
        COUNTROWS ( 'Date Parameter' ) = 1,
        SELECTCOLUMNS ( 'Date Parameter', 'Date Parameter'[Date Parameter] )
    )
RETURN
    SWITCH (
        SelectedDateParameter,
        "Week", 10,
        "Month", 20,
        "Year", 30
    )&lt;/LI-CODE&gt;
&lt;P&gt;Note that we cannot directly write &lt;CODE&gt;SELECTEDVALUE ( 'Date Parameter'[Date Parameter] )&lt;/CODE&gt;&lt;/P&gt;
&lt;P&gt;(&lt;A href="https://www.sqlbi.com/blog/marco/2022/06/11/using-selectedvalue-with-fields-parameters-in-power-bi/" target="_blank" rel="noopener"&gt;see here&lt;/A&gt;).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Finally, replaced the bookmark navigator with a slicer on &lt;CODE&gt;'Date Parameter'[Date Parameter]&lt;/CODE&gt;.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I also recommend disabling Auto date/time.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;PBIX attached.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards&lt;/P&gt;</description>
      <pubDate>Mon, 05 May 2025 22:28:23 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-Not-Working-on-Line-Chart-Y-Axis-Maximum/m-p/4681028#M179292</guid>
      <dc:creator>OwenAuger</dc:creator>
      <dc:date>2025-05-05T22:28:23Z</dc:date>
    </item>
    <item>
      <title>Re: Measure Not Working on Line Chart Y-Axis Maximum</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-Not-Working-on-Line-Chart-Y-Axis-Maximum/m-p/4684161#M179399</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="836871" data-lia-user-login="Cabbage_Baby" class="lia-mention lia-mention-user"&gt;Cabbage_Baby&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thankyou&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="6799" data-lia-user-login="OwenAuger" class="lia-mention lia-mention-user"&gt;OwenAuger&lt;/a&gt;&amp;nbsp;for your reply on the issue.&lt;/P&gt;
&lt;P&gt;I'm glad to hear that your query was resolved! If the response provided by the community member addressed your concern, kindly confirm.&lt;/P&gt;
&lt;P&gt;Marking it as &lt;STRONG&gt;Accept Answer&lt;/STRONG&gt;&amp;nbsp;and give us &lt;STRONG&gt;Kudos&lt;/STRONG&gt;&amp;nbsp;if you found it helpful allows us to ensure that the solutions shared are valuable for the entire community.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you have any further questions, feel free to reach out!&lt;BR /&gt;Thank you for your cooperation!&lt;/P&gt;
&lt;P&gt;&lt;LI-WRAPPER&gt;&lt;/LI-WRAPPER&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 08 May 2025 07:17:12 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-Not-Working-on-Line-Chart-Y-Axis-Maximum/m-p/4684161#M179399</guid>
      <dc:creator>v-sgandrathi</dc:creator>
      <dc:date>2025-05-08T07:17:12Z</dc:date>
    </item>
    <item>
      <title>Re: Measure Not Working on Line Chart Y-Axis Maximum</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-Not-Working-on-Line-Chart-Y-Axis-Maximum/m-p/4688888#M179573</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="836871" data-lia-user-login="Cabbage_Baby" class="lia-mention lia-mention-user"&gt;Cabbage_Baby&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;May I ask if you have gotten this issue resolved?&lt;/P&gt;
&lt;P&gt;If it is solved, please mark the helpful reply or share your solution and accept it as solution, it will be helpful for other members of the community who have similar problems as yours to solve it faster.&lt;/P&gt;
&lt;P&gt;&lt;LI-WRAPPER&gt;&lt;/LI-WRAPPER&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you.&lt;/P&gt;</description>
      <pubDate>Mon, 12 May 2025 09:58:15 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-Not-Working-on-Line-Chart-Y-Axis-Maximum/m-p/4688888#M179573</guid>
      <dc:creator>v-sgandrathi</dc:creator>
      <dc:date>2025-05-12T09:58:15Z</dc:date>
    </item>
    <item>
      <title>Re: Measure Not Working on Line Chart Y-Axis Maximum</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-Not-Working-on-Line-Chart-Y-Axis-Maximum/m-p/4694677#M179799</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="836871" data-lia-user-login="Cabbage_Baby" class="lia-mention lia-mention-user"&gt;Cabbage_Baby&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I wanted to check in your situation regarding the issue. Have you resolved it? If you have, please consider marking the reply as &lt;STRONG&gt;Accepted solution&lt;/STRONG&gt;&amp;nbsp;and give &lt;STRONG&gt;Kudos&lt;/STRONG&gt; that helped you. It would be greatly appreciated by others in the community who may have the same question.&lt;/P&gt;
&lt;P&gt;&lt;LI-WRAPPER&gt;&lt;/LI-WRAPPER&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you.&lt;/P&gt;</description>
      <pubDate>Thu, 15 May 2025 15:51:42 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-Not-Working-on-Line-Chart-Y-Axis-Maximum/m-p/4694677#M179799</guid>
      <dc:creator>v-sgandrathi</dc:creator>
      <dc:date>2025-05-15T15:51:42Z</dc:date>
    </item>
  </channel>
</rss>

