<?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: Alter DAX measure to display  highest value in a line chart in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Alter-DAX-measure-to-display-highest-value-in-a-line-chart/m-p/4411032#M175182</link>
    <description>&lt;P&gt;&lt;SPAN&gt;rectified this issue using&amp;nbsp;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;CALCULATE(&lt;/SPAN&gt;&lt;SPAN&gt;[SumRangeSpace1], ALL('Date'))&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 14 Feb 2025 12:02:31 GMT</pubDate>
    <dc:creator>Tini-Bee</dc:creator>
    <dc:date>2025-02-14T12:02:31Z</dc:date>
    <item>
      <title>Alter DAX measure to display  highest value in a line chart</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Alter-DAX-measure-to-display-highest-value-in-a-line-chart/m-p/4401375#M174722</link>
      <description>&lt;P&gt;I want to return the highest &lt;STRONG&gt;Sum Range Space&lt;/STRONG&gt;&amp;nbsp;(&amp;nbsp;ie check and store the highest value&amp;nbsp;&lt;STRONG&gt;6408&lt;/STRONG&gt;) in the Line chart below. I want the line chart to be straight and not 'dip' to 300 on dates when Sum Range Space is below 6408&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;I've selected two Houses;&amp;nbsp;&lt;BR /&gt;1)&amp;nbsp; House 1 with&amp;nbsp;Sum Range Space = &lt;STRONG&gt;6108&lt;/STRONG&gt;&lt;BR /&gt;2) House 2 with Sum Range Space = &lt;STRONG&gt;300&lt;BR /&gt;&lt;BR /&gt;&lt;/STRONG&gt;When both are selected they should return&amp;nbsp;Sum Range Space = 6408 and not 300 as in the screenshot above&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;BR /&gt;Measure I want to alter:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Sum Range Space&lt;/STRONG&gt; =&lt;BR /&gt;VAR RangeSpaceCount = CALCULATE(COUNT(' Build_Capacity'[RangeSpace]&lt;/P&gt;&lt;P&gt;VAR TotalCount = &amp;nbsp;CALCULATE(DISTINCTCOUNT('Build_Usage'[ID]), ALL('Date'))&lt;/P&gt;&lt;P&gt;VAR BLANKK = BLANK()&lt;/P&gt;&lt;P&gt;RETURN&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; IF (&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; (&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ISFILTERED ( 'Hs'[House Name] )&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;amp;&amp;amp; RangeSpaceCount = TotalCount&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ),&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; [SumRangeSpace1],&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; BLANK()&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; )&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;The underlying measure [SumRangeSpace1] is&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;SumRangeSpace1 = CALCULATE (&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; SUM( 'Build_Capacity'[RangeSpace] ),&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; TREATAS (&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; VALUES ( 'Build_Usage'[ID] ),&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 'Build_Capacity'[ID]&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; )&lt;/P&gt;&lt;P&gt;)&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;Build_Capacity&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Build_Usage&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;STRONG&gt;Relationship&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 09 Feb 2025 10:41:24 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Alter-DAX-measure-to-display-highest-value-in-a-line-chart/m-p/4401375#M174722</guid>
      <dc:creator>Tini-Bee</dc:creator>
      <dc:date>2025-02-09T10:41:24Z</dc:date>
    </item>
    <item>
      <title>Re: Alter DAX measure to display  highest value in a line chart</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Alter-DAX-measure-to-display-highest-value-in-a-line-chart/m-p/4401470#M174729</link>
      <description>&lt;P&gt;We want to help you but your description is too vague. Please write it again clearly.&lt;/P&gt;
&lt;P&gt;Please DON'T copy &amp;amp; paste your DAX that does not work and expect us to fathom what you want to do. That is a bit crazy. &lt;span class="lia-unicode-emoji" title=":grinning_face:"&gt;😀&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Please just give a simple non technical functional description of what you want, then let us suggest the solution. Thank you.&lt;/P&gt;
&lt;P&gt;Provide example input data as table text (not a screen print) so we can import the data to build a solution for you.&lt;/P&gt;
&lt;P&gt;Remove any unneeded columns which may cause confusion.&lt;/P&gt;
&lt;P&gt;Rename columns to user friendly names. Avoid jargon like&amp;nbsp;&lt;SPAN&gt;Build_Capacity'[RangeSpace].&lt;/SPAN&gt;&lt;BR /&gt;Also provide the example desired output, with a clear step-by-step description of calculations the process flow.&lt;BR /&gt;Remember not to share private data ... we don't want you to get into trouble. &lt;span class="lia-unicode-emoji" title=":anguished_face:"&gt;😧&lt;/span&gt;&lt;BR /&gt;Take time and care to use the same table and field names in the input, output and description so we can understand your problem and help you.&lt;BR /&gt;Try keep it simple and ask one question per ticket.&lt;BR /&gt;You will get a quick response if you put time, care and effort into writing clear problem descriptions.&lt;BR /&gt;Remember you are gertting free expert help, so please put lots of proper effort to asking questions and providing examples.&lt;/P&gt;
&lt;P&gt;Vaugue descriptions can waste your time and our time.&lt;/P&gt;
&lt;P&gt;Look forward to helping you when the above information is forthcoming&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Perhaps you can learn DAX and adapt the logic from this example, which prevents the line dropping below 20% of the max.&amp;nbsp; &lt;BR /&gt;&lt;BR /&gt;Note how the CALCUALATE use ALL to get the max value.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Then the IF returns the actual or base value&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please click thumps up for the helpful suggestions and then [accept solution] if it works.&amp;nbsp; Thanks&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Answer = 
// Get your actual value
var actualvalue = SUM(yourdata[Amount])

// Get 20% of max value
var base =
CALCULATE( 
    MAX(yourdata[Amount]),  
    ALL(yourdata[Dates])
    ) 
    * 0.20

RETURN
// dont go below the base value
IF(actualvalue &amp;lt; base, base, actualvalue)

&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&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;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;/DIV&gt;</description>
      <pubDate>Sun, 09 Feb 2025 14:00:57 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Alter-DAX-measure-to-display-highest-value-in-a-line-chart/m-p/4401470#M174729</guid>
      <dc:creator>speedramps</dc:creator>
      <dc:date>2025-02-09T14:00:57Z</dc:date>
    </item>
    <item>
      <title>Re: Alter DAX measure to display  highest value in a line chart</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Alter-DAX-measure-to-display-highest-value-in-a-line-chart/m-p/4402410#M174758</link>
      <description>&lt;P&gt;Thanks for your advice;&lt;BR /&gt;using the fix provided I want to utilise the CALCULATE MAX as follows:&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Sum Range Space&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;=&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;varTest = CALCULATE(MAX([SumRangeSpace1], ALL('Date')))&lt;/STRONG&gt;&lt;/EM&gt;&lt;BR /&gt;VAR RangeSpaceCount = CALCULATE(COUNT(' Build_Capacity'[RangeSpace]&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;VAR TotalCount = &amp;nbsp;CALCULATE(DISTINCTCOUNT('Build_Usage'[ID]), ALL('Date'))&lt;/P&gt;&lt;P&gt;VAR BLANKK = BLANK()&lt;/P&gt;&lt;P&gt;RETURN&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; IF (&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; (&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ISFILTERED ( 'Hs'[House Name] )&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;amp;&amp;amp; RangeSpaceCount = TotalCount&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ),&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;STRONG&gt;[SumRangeSpace1]&lt;/STRONG&gt;,&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; BLANK()&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; )&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;The underlying measure [SumRangeSpace1] is&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;SumRangeSpace1 = CALCULATE (&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; SUM( 'Build_Capacity'[RangeSpace] ),&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; TREATAS (&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; VALUES ( 'Build_Usage'[ID] ),&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 'Build_Capacity'[ID]&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; )&lt;/P&gt;&lt;P&gt;)&lt;/P&gt;</description>
      <pubDate>Mon, 10 Feb 2025 07:47:59 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Alter-DAX-measure-to-display-highest-value-in-a-line-chart/m-p/4402410#M174758</guid>
      <dc:creator>Tini-Bee</dc:creator>
      <dc:date>2025-02-10T07:47:59Z</dc:date>
    </item>
    <item>
      <title>Re: Alter DAX measure to display  highest value in a line chart</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Alter-DAX-measure-to-display-highest-value-in-a-line-chart/m-p/4411032#M175182</link>
      <description>&lt;P&gt;&lt;SPAN&gt;rectified this issue using&amp;nbsp;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;CALCULATE(&lt;/SPAN&gt;&lt;SPAN&gt;[SumRangeSpace1], ALL('Date'))&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 14 Feb 2025 12:02:31 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Alter-DAX-measure-to-display-highest-value-in-a-line-chart/m-p/4411032#M175182</guid>
      <dc:creator>Tini-Bee</dc:creator>
      <dc:date>2025-02-14T12:02:31Z</dc:date>
    </item>
  </channel>
</rss>

