<?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: Return two values from two different measures, based on one selected column. in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Return-two-values-from-two-different-measures-based-on-one/m-p/2970097#M99211</link>
    <description>&lt;P&gt;hello&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="451827" data-lia-user-login="SLJN" class="lia-mention lia-mention-user"&gt;SLJN&lt;/a&gt;&amp;nbsp;. I would create a calculated column with an if clause (get the 'if rolling 30 days' syntax like you have done already) and if true set it to 1 else 0. So you will have on a row level dynamically this information, whether this lineitem belongs to rolling 30 days or not. Then you can work on the 1s and 0s to create a slicer or a button. Does this make sense? thanks!&lt;/P&gt;</description>
    <pubDate>Thu, 15 Dec 2022 08:21:41 GMT</pubDate>
    <dc:creator>IIPowerBlog</dc:creator>
    <dc:date>2022-12-15T08:21:41Z</dc:date>
    <item>
      <title>Return two values from two different measures, based on one selected column.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Return-two-values-from-two-different-measures-based-on-one/m-p/2967954#M99109</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm trying to return planned weight and actual weight for the last 30 days based on a selected BU.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When the user select bu ANR in a slicer and then rolling 30 days in another I want them to display both actual weight and planned weight by just choosing "rolling 30".&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Background:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;There are several business units, and they have several products, but its only certain products and their weight that I'm interested of.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Firstly, I have created a measure for each unit and their products and weights.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Actial Production (SOUTH) =&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;CALCULATE&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;(&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;[ACTUAL WEIGHT(KG)]&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;KEEPFILTERS&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;DIM_BU&lt;/SPAN&gt;&lt;SPAN&gt;[Buid]&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;=&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;"SOUTH"&lt;/SPAN&gt;&lt;SPAN&gt;),&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;KEEPFILTERS&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;DIM_PRODUCT&lt;/SPAN&gt;&lt;SPAN&gt;[PRODUCT]&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;IN&lt;/SPAN&gt;&lt;S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bsp; &amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;SWITCH&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;True&lt;/SPAN&gt;&lt;SPAN&gt;(),&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; BU&lt;/SPAN&gt;&lt;SPAN&gt;=&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;"SOUTH"&lt;/SPAN&gt;&lt;SPAN&gt;,&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;[Production (SOUTH)]&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;...)&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;I have done a measure for rolling 30, ytd etc.&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;In my report I have a slicer for the BU but i also want a slicer that only displays rolling 30 days, month, ytd. And when the user select rolling 30 a line chart will appear with two lines, that is actual and planned production.&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;How is the easiest way to solve this?&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 14 Dec 2022 12:23:34 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Return-two-values-from-two-different-measures-based-on-one/m-p/2967954#M99109</guid>
      <dc:creator>SLJN</dc:creator>
      <dc:date>2022-12-14T12:23:34Z</dc:date>
    </item>
    <item>
      <title>Re: Return two values from two different measures, based on one selected column.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Return-two-values-from-two-different-measures-based-on-one/m-p/2970097#M99211</link>
      <description>&lt;P&gt;hello&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="451827" data-lia-user-login="SLJN" class="lia-mention lia-mention-user"&gt;SLJN&lt;/a&gt;&amp;nbsp;. I would create a calculated column with an if clause (get the 'if rolling 30 days' syntax like you have done already) and if true set it to 1 else 0. So you will have on a row level dynamically this information, whether this lineitem belongs to rolling 30 days or not. Then you can work on the 1s and 0s to create a slicer or a button. Does this make sense? thanks!&lt;/P&gt;</description>
      <pubDate>Thu, 15 Dec 2022 08:21:41 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Return-two-values-from-two-different-measures-based-on-one/m-p/2970097#M99211</guid>
      <dc:creator>IIPowerBlog</dc:creator>
      <dc:date>2022-12-15T08:21:41Z</dc:date>
    </item>
    <item>
      <title>Re: Return two values from two different measures, based on one selected column.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Return-two-values-from-two-different-measures-based-on-one/m-p/2970221#M99221</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="451827" data-lia-user-login="SLJN" class="lia-mention lia-mention-user"&gt;SLJN&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;According to your requirements description, what you want to achieve is to display the displayed fields in your line chart according to the user's choice of the slicer on the report page according to the user's selection, such as when the user chooses to scroll 30, a line chart with two lines will appear, that is, actual production and planned production, for this requirement I think the best solution at present is to try to use Power BI's new preview function field parameter in recent months, It can support the display of specific visuals in your report according to the selection in the field slicer, you can refer to this official document to explore your solution:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://learn.microsoft.com/en-us/power-bi/create-reports/power-bi-field-parameters" target="_blank"&gt;Let report readers use field parameters to change visuals (preview) - Power BI | Microsoft Learn&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Neeko Tang&lt;/P&gt;
&lt;P&gt;If this post  &lt;STRONG&gt;helps&lt;/STRONG&gt;, then please consider &lt;STRONG&gt;&lt;EM&gt;Accept it as the solution &lt;/EM&gt;&lt;/STRONG&gt; to help the other members find it more quickly.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 15 Dec 2022 09:01:30 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Return-two-values-from-two-different-measures-based-on-one/m-p/2970221#M99221</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-12-15T09:01:30Z</dc:date>
    </item>
    <item>
      <title>Re: Return two values from two different measures, based on one selected column.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Return-two-values-from-two-different-measures-based-on-one/m-p/2971567#M99336</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I found this with field parameters&amp;nbsp;&lt;A href="https://www.sqlbi.com/blog/marco/2022/06/11/using-selectedvalue-with-fields-parameters-in-power-bi/" target="_blank"&gt;Using SELECTEDVALUE with Fields Parameters in Power BI - SQLBI&lt;/A&gt;. I would need to use summarize and that's not optimal.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;I created a table instead, together with a switch and now it works.&amp;nbsp; &amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 15 Dec 2022 17:58:18 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Return-two-values-from-two-different-measures-based-on-one/m-p/2971567#M99336</guid>
      <dc:creator>SLJN</dc:creator>
      <dc:date>2022-12-15T17:58:18Z</dc:date>
    </item>
    <item>
      <title>Re: Return two values from two different measures, based on one selected column.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Return-two-values-from-two-different-measures-based-on-one/m-p/2971573#M99337</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I wanted a more dynamic way of doing it so i created a table with only one column and used abbreviaation for every average. Then i used switch to connect it.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 15 Dec 2022 18:01:51 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Return-two-values-from-two-different-measures-based-on-one/m-p/2971573#M99337</guid>
      <dc:creator>SLJN</dc:creator>
      <dc:date>2022-12-15T18:01:51Z</dc:date>
    </item>
  </channel>
</rss>

