<?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 multiple target lines by filtering with slicer + differences on the column in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Power-BI-multiple-target-lines-by-filtering-with-slicer/m-p/4273088#M169507</link>
    <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="839163" data-lia-user-login="Evelin_" class="lia-mention lia-mention-user"&gt;Evelin_&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Can you please try the following:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Actual_vs_Target_Display = 
VAR SelectedTarget = SELECTEDVALUE('Table'[Version]) -- Get the selected target from the slicer
VAR ActualSales = 
    CALCULATE(
        SUM('Table'[Sales]),
        'Table'[Version] = "ACT"
    )
VAR TargetSales = 
    CALCULATE(
        SUM('Table'[Sales]),
        'Table'[Version] = SelectedTarget
    )
VAR SalesDifference = ActualSales - TargetSales
VAR PercentDifference = 
    IF(
        TargetSales &amp;lt;&amp;gt; 0,
        DIVIDE(SalesDifference, TargetSales, 0),
        BLANK()
    )
RETURN
    IF(
        NOT(ISBLANK(ActualSales)),
        ActualSales &amp;amp; " (Target: " &amp;amp; TargetSales &amp;amp; ", Diff: " &amp;amp; FORMAT(PercentDifference, "0.00%") &amp;amp; ")",
        BLANK()
    )
&lt;/LI-CODE&gt;</description>
    <pubDate>Wed, 06 Nov 2024 22:20:08 GMT</pubDate>
    <dc:creator>Sahir_Maharaj</dc:creator>
    <dc:date>2024-11-06T22:20:08Z</dc:date>
    <item>
      <title>Power BI multiple target lines by filtering with slicer + differences on the column</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Power-BI-multiple-target-lines-by-filtering-with-slicer/m-p/4272683#M169490</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I would like to create a chart where actuals are columns/months and target can be selected with slicer and it changes dynamically. Even more if possible, I would like to add the %diff on top of the columns vs the selected target. I did the chart against 1 target, but I can not develop it further with more targets. I show you 1 column example where target is the grey short line and the figures are calculated with dax.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;Is it possible to have 3 different targets in 1 chart and after selecting one by slicer, the differences will appear? I dont want to have 3 targets on the chart at the same time.&lt;/P&gt;&lt;P&gt;Maybe my table does it a little bit harder, as I have 1 database where there is 1 column with the version, meaning actual, BP, PY, everything is in 1 column. See a dummy version:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you in advance for the help!&lt;/P&gt;</description>
      <pubDate>Wed, 06 Nov 2024 14:57:31 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Power-BI-multiple-target-lines-by-filtering-with-slicer/m-p/4272683#M169490</guid>
      <dc:creator>Evelin_</dc:creator>
      <dc:date>2024-11-06T14:57:31Z</dc:date>
    </item>
    <item>
      <title>Re: Power BI multiple target lines by filtering with slicer + differences on the column</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Power-BI-multiple-target-lines-by-filtering-with-slicer/m-p/4273088#M169507</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="839163" data-lia-user-login="Evelin_" class="lia-mention lia-mention-user"&gt;Evelin_&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Can you please try the following:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Actual_vs_Target_Display = 
VAR SelectedTarget = SELECTEDVALUE('Table'[Version]) -- Get the selected target from the slicer
VAR ActualSales = 
    CALCULATE(
        SUM('Table'[Sales]),
        'Table'[Version] = "ACT"
    )
VAR TargetSales = 
    CALCULATE(
        SUM('Table'[Sales]),
        'Table'[Version] = SelectedTarget
    )
VAR SalesDifference = ActualSales - TargetSales
VAR PercentDifference = 
    IF(
        TargetSales &amp;lt;&amp;gt; 0,
        DIVIDE(SalesDifference, TargetSales, 0),
        BLANK()
    )
RETURN
    IF(
        NOT(ISBLANK(ActualSales)),
        ActualSales &amp;amp; " (Target: " &amp;amp; TargetSales &amp;amp; ", Diff: " &amp;amp; FORMAT(PercentDifference, "0.00%") &amp;amp; ")",
        BLANK()
    )
&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 06 Nov 2024 22:20:08 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Power-BI-multiple-target-lines-by-filtering-with-slicer/m-p/4273088#M169507</guid>
      <dc:creator>Sahir_Maharaj</dc:creator>
      <dc:date>2024-11-06T22:20:08Z</dc:date>
    </item>
    <item>
      <title>Re: Power BI multiple target lines by filtering with slicer + differences on the column</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Power-BI-multiple-target-lines-by-filtering-with-slicer/m-p/4273633#M169533</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="839163" data-lia-user-login="Evelin_" class="lia-mention lia-mention-user"&gt;Evelin_&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Did &lt;STRONG&gt;Sahir_Maharaj&lt;/STRONG&gt; reply solve your problem? If so, please mark it as the correct solution, and point out if the problem persists.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best regards,&lt;/P&gt;
&lt;P&gt;Adamk Kong&lt;/P&gt;</description>
      <pubDate>Thu, 07 Nov 2024 08:09:10 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Power-BI-multiple-target-lines-by-filtering-with-slicer/m-p/4273633#M169533</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-11-07T08:09:10Z</dc:date>
    </item>
    <item>
      <title>Re: Power BI multiple target lines by filtering with slicer + differences on the column</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Power-BI-multiple-target-lines-by-filtering-with-slicer/m-p/4273677#M169537</link>
      <description>&lt;P&gt;Hello Sahir,&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for the dax, with your help I created this measure succesfully in my PowerBI. Only question left is how I add it on the chart and connect it with the slicer? So far I had the posting period in X axis, actual sales column y axis, and 1 target line on line y axis, and this is what I want to change based on slicer + the value label.&lt;/P&gt;&lt;P&gt;Thank you very much!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 07 Nov 2024 08:48:35 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Power-BI-multiple-target-lines-by-filtering-with-slicer/m-p/4273677#M169537</guid>
      <dc:creator>Evelin_</dc:creator>
      <dc:date>2024-11-07T08:48:35Z</dc:date>
    </item>
    <item>
      <title>Re: Power BI multiple target lines by filtering with slicer + differences on the column</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Power-BI-multiple-target-lines-by-filtering-with-slicer/m-p/4273725#M169544</link>
      <description>&lt;P&gt;I did it, Thank you for your help! it was very useful to finish my chart &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 07 Nov 2024 09:24:39 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Power-BI-multiple-target-lines-by-filtering-with-slicer/m-p/4273725#M169544</guid>
      <dc:creator>Evelin_</dc:creator>
      <dc:date>2024-11-07T09:24:39Z</dc:date>
    </item>
  </channel>
</rss>

