<?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 How Do I create a variable as static values and put it in the Y coordinate of a graph? in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-Do-I-create-a-variable-as-static-values-and-put-it-in-the-Y/m-p/3840983#M150166</link>
    <description>&lt;P&gt;Hello Everyone,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I’m reaching out to this knowledgeable community for some assistance or guidance on a matter related to Power BI.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I’m attempting to create a variable with static values. For instance, I’d like to set the value as 30 for the current quarter of this year, and then assign a different static value, such as 35, for another quarter of this year.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The goal is to use this variable as the Y-axis in a graph.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;this is how I get the year and quarter for this quarter&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;= &lt;/SPAN&gt;&lt;SPAN&gt;YEAR&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;TODAY&lt;/SPAN&gt;&lt;SPAN&gt;())&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;= &lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;QUARTER&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;TODAY&lt;/SPAN&gt;&lt;SPAN&gt;())&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;Any help or guidance on how to achieve this would be greatly appreciated.&lt;/P&gt;&lt;P&gt;If you need anything from me just ask!&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Thank you in advance!&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 16 Apr 2024 10:18:06 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2024-04-16T10:18:06Z</dc:date>
    <item>
      <title>How Do I create a variable as static values and put it in the Y coordinate of a graph?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-Do-I-create-a-variable-as-static-values-and-put-it-in-the-Y/m-p/3840983#M150166</link>
      <description>&lt;P&gt;Hello Everyone,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I’m reaching out to this knowledgeable community for some assistance or guidance on a matter related to Power BI.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I’m attempting to create a variable with static values. For instance, I’d like to set the value as 30 for the current quarter of this year, and then assign a different static value, such as 35, for another quarter of this year.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The goal is to use this variable as the Y-axis in a graph.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;this is how I get the year and quarter for this quarter&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;= &lt;/SPAN&gt;&lt;SPAN&gt;YEAR&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;TODAY&lt;/SPAN&gt;&lt;SPAN&gt;())&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;= &lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;QUARTER&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;TODAY&lt;/SPAN&gt;&lt;SPAN&gt;())&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;Any help or guidance on how to achieve this would be greatly appreciated.&lt;/P&gt;&lt;P&gt;If you need anything from me just ask!&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Thank you in advance!&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 16 Apr 2024 10:18:06 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-Do-I-create-a-variable-as-static-values-and-put-it-in-the-Y/m-p/3840983#M150166</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-04-16T10:18:06Z</dc:date>
    </item>
    <item>
      <title>Re: How Do I create a variable as static values and put it in the Y coordinate of a graph?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-Do-I-create-a-variable-as-static-values-and-put-it-in-the-Y/m-p/3843047#M150240</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/LI-USER&gt;&amp;nbsp;,&lt;BR /&gt;Here some steps that I want to share, you can check them if they suitable for your requirement.&lt;BR /&gt;Here is my test data:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;Create measure&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Value = 
VAR _currentYear = YEAR(TODAY())
VAR _currentQuarter = QUARTER(TODAY())
RETURN
IF(
    YEAR(SELECTEDVALUE('Table'[Date])) = _currentYear &amp;amp;&amp;amp; QUARTER(SELECTEDVALUE('Table'[Date])) = _currentQuarter,
    30,
    35
)&lt;/LI-CODE&gt;
&lt;P&gt;Final output&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;Best regards,&lt;/P&gt;
&lt;P&gt;Albert He&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If this post &lt;EM&gt;&lt;STRONG&gt;helps&lt;/STRONG&gt;&lt;/EM&gt;, then please consider&lt;EM&gt;&lt;STRONG&gt; Accept it as the solution&lt;/STRONG&gt; &lt;/EM&gt;to help the other members find it more quickly&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 17 Apr 2024 02:08:18 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-Do-I-create-a-variable-as-static-values-and-put-it-in-the-Y/m-p/3843047#M150240</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-04-17T02:08:18Z</dc:date>
    </item>
    <item>
      <title>Re: How Do I create a variable as static values and put it in the Y coordinate of a graph?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-Do-I-create-a-variable-as-static-values-and-put-it-in-the-Y/m-p/3853545#M150559</link>
      <description>&lt;P&gt;Hi Albert He,&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;thank you for helping out.&lt;BR /&gt;The formula that you send me does work but it does not meet my requirements.&lt;BR /&gt;&lt;BR /&gt;The formula does create a&amp;nbsp; line but it does not get filtered by the filters applied. See images&lt;BR /&gt;It should only appear between some dates.&amp;nbsp;&lt;BR /&gt;&lt;img /&gt;&lt;BR /&gt;I want the line to appear only in the specified range that I have in the filter and also would be nice if you could explain how to add values for other years and quarters.&amp;nbsp;&lt;BR /&gt;So for example if I want to have a number for each quarter and show that number to the graph when that selected filter of date is applied.&lt;BR /&gt;2024 Q1 as 0.30&amp;nbsp;&lt;BR /&gt;2024 Q2 as 0.31&amp;nbsp;&lt;BR /&gt;2024 Q3 as 0.32&amp;nbsp;&lt;BR /&gt;2024 Q4 as 0.33&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Do you know why is this the case or how to fix this ?&amp;nbsp;&lt;BR /&gt;Thank you.&lt;/P&gt;</description>
      <pubDate>Fri, 19 Apr 2024 11:46:26 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-Do-I-create-a-variable-as-static-values-and-put-it-in-the-Y/m-p/3853545#M150559</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-04-19T11:46:26Z</dc:date>
    </item>
    <item>
      <title>Re: How Do I create a variable as static values and put it in the Y coordinate of a graph?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-Do-I-create-a-variable-as-static-values-and-put-it-in-the-Y/m-p/3867642#M151091</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/LI-USER&gt;&amp;nbsp;，&lt;BR /&gt;Thanks for the reply, you can create a new filter table and then apply the data from that table to create a slicer. Use max and min to select the range.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;Best regards,&lt;/P&gt;
&lt;P&gt;Albert He&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If this post&lt;EM&gt;&lt;STRONG&gt; helps&lt;/STRONG&gt;&lt;/EM&gt;, then please consider &lt;EM&gt;&lt;STRONG&gt;Accept it as the solution&lt;/STRONG&gt;&lt;/EM&gt; to help the other members find it more quickly&lt;/P&gt;</description>
      <pubDate>Thu, 25 Apr 2024 08:05:46 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-Do-I-create-a-variable-as-static-values-and-put-it-in-the-Y/m-p/3867642#M151091</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-04-25T08:05:46Z</dc:date>
    </item>
  </channel>
</rss>

