<?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: DAX help to use the distinct values of a measure in another measure in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-help-to-use-the-distinct-values-of-a-measure-in-another/m-p/3998960#M155680</link>
    <description>&lt;P&gt;Before doing anything else - unpivot your source data.&amp;nbsp; Wide tables are an Excel thing, not something you want to do in Power BI.&lt;/P&gt;</description>
    <pubDate>Tue, 18 Jun 2024 22:46:15 GMT</pubDate>
    <dc:creator>lbendlin</dc:creator>
    <dc:date>2024-06-18T22:46:15Z</dc:date>
    <item>
      <title>DAX help to use the distinct values of a measure in another measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-help-to-use-the-distinct-values-of-a-measure-in-another/m-p/3998036#M155647</link>
      <description>&lt;P&gt;Hi everyone,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm working on a big dataset to produce triangles &amp;amp; affiliated figures (for an insurance report). I was able to make the claims triangle without too much trouble as well as the related coefficients. The data at the end looks like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;MONTH&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;TD&gt;3&lt;/TD&gt;&lt;TD&gt;4&lt;/TD&gt;&lt;TD&gt;5&lt;/TD&gt;&lt;TD&gt;6&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;COEFFICIENT&lt;/TD&gt;&lt;TD&gt;2,4&lt;/TD&gt;&lt;TD&gt;2,3&lt;/TD&gt;&lt;TD&gt;1,6&lt;/TD&gt;&lt;TD&gt;1,3&lt;/TD&gt;&lt;TD&gt;1,3&lt;/TD&gt;&lt;TD&gt;1,2&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;BR /&gt;And so on up to month 36.&lt;/P&gt;&lt;P&gt;The coefficient continues to decrease until it reaches 1 and does so depending on a selected value on a slicer (basically, it can go to 1 in 6, 12, 24 or 36 months). This dynamic behaviour is required. Month comes from a separate table.&lt;/P&gt;&lt;P&gt;The coefficient comes from a measure so what I've described above is a matrix view, not a table view.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now comes the fun part, I need to calculate, for each month, the inverse of the product of each month's coefficient up to the 36th (so the first value is 1 / (2.4 * 2.3 * 1.6 * 1.3 * 1.3 * 1.2 * ...) , the second value is 1 / (2.3 * 1.6 * 1.3 * 1.3 * 1.2 * ...) and so on). The final data should be the following:&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;MONTH&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;TD&gt;3&lt;/TD&gt;&lt;TD&gt;4&lt;/TD&gt;&lt;TD&gt;5&lt;/TD&gt;&lt;TD&gt;6&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;COEFFICIENT&lt;/TD&gt;&lt;TD&gt;2,4&lt;/TD&gt;&lt;TD&gt;2,3&lt;/TD&gt;&lt;TD&gt;1,6&lt;/TD&gt;&lt;TD&gt;1,3&lt;/TD&gt;&lt;TD&gt;1,3&lt;/TD&gt;&lt;TD&gt;1,2&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;PRODUCT&lt;/TD&gt;&lt;TD&gt;17,911296&lt;/TD&gt;&lt;TD&gt;7,46304&lt;/TD&gt;&lt;TD&gt;3,2448&lt;/TD&gt;&lt;TD&gt;2,028&lt;/TD&gt;&lt;TD&gt;1,56&lt;/TD&gt;&lt;TD&gt;1,2&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;FINAL MEASURE (1/PRODUCT)&lt;/TD&gt;&lt;TD&gt;6%&lt;/TD&gt;&lt;TD&gt;13%&lt;/TD&gt;&lt;TD&gt;31%&lt;/TD&gt;&lt;TD&gt;49%&lt;/TD&gt;&lt;TD&gt;64%&lt;/TD&gt;&lt;TD&gt;83%&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For the life of me, I cannot get this to work and I think it's because I can't get the values of the measure coefficient to behave nicely (aka, the way a column would work). I've tried using DISTINCT or VALUES on the measure, but they don't work on measures, I've tried to summarize and ADDCOLUMNS with the measure but no dice. It is crucial that the Coefficient remains a measure as I need to be able to filter things in the matrix view.&lt;/P&gt;&lt;P&gt;Does anyone have an idea on how to proceed? If more data is needed to grasp the situation, don't hesitate to ask. Thank you so much in advance.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;EDIT: I'm adding a wetransfer link to an example I created directly on PowerBI so that it would be clearer; would really appreciate any help on this!&lt;/P&gt;&lt;P&gt;&lt;A href="https://we.tl/t-TVDzBQ6oXi" target="_self"&gt;https://we.tl/t-TVDzBQ6oXi&lt;/A&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 01 Jul 2024 12:37:47 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-help-to-use-the-distinct-values-of-a-measure-in-another/m-p/3998036#M155647</guid>
      <dc:creator>engel_baut</dc:creator>
      <dc:date>2024-07-01T12:37:47Z</dc:date>
    </item>
    <item>
      <title>Re: DAX help to use the distinct values of a measure in another measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-help-to-use-the-distinct-values-of-a-measure-in-another/m-p/3998960#M155680</link>
      <description>&lt;P&gt;Before doing anything else - unpivot your source data.&amp;nbsp; Wide tables are an Excel thing, not something you want to do in Power BI.&lt;/P&gt;</description>
      <pubDate>Tue, 18 Jun 2024 22:46:15 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-help-to-use-the-distinct-values-of-a-measure-in-another/m-p/3998960#M155680</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2024-06-18T22:46:15Z</dc:date>
    </item>
    <item>
      <title>Re: DAX help to use the distinct values of a measure in another measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-help-to-use-the-distinct-values-of-a-measure-in-another/m-p/4000167#M155785</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for your answer, I think I wasn't clear: the source data is unpivoted. The pivot table is only in the visual, &amp;amp; the measure I do for the coefficients is then calculated accordingly to the pivot layout. I don't think I could do it another way either, but if you have any ideas I'll gladly take them?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks again&lt;/P&gt;</description>
      <pubDate>Wed, 19 Jun 2024 12:52:37 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-help-to-use-the-distinct-values-of-a-measure-in-another/m-p/4000167#M155785</guid>
      <dc:creator>engel_baut</dc:creator>
      <dc:date>2024-06-19T12:52:37Z</dc:date>
    </item>
    <item>
      <title>Re: DAX help to use the distinct values of a measure in another measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-help-to-use-the-distinct-values-of-a-measure-in-another/m-p/4000337#M155803</link>
      <description>&lt;P&gt;Please provide sample data that covers your issue or question &lt;STRONG&gt;completely&lt;/STRONG&gt;, in a &lt;STRONG&gt;usable&lt;/STRONG&gt; format (not as a screenshot).&lt;BR /&gt;&lt;BR /&gt;Do not include sensitive information or anything not related to the issue or question. &lt;BR /&gt;&lt;BR /&gt;If you are unsure how to upload data please refer to &lt;A href="https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-p/963216" target="_blank"&gt;https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-p/963216&lt;/A&gt; &lt;BR /&gt;&lt;BR /&gt;Please show the expected outcome based on the sample data you provided. &lt;BR /&gt;&lt;BR /&gt;Want faster answers? &lt;A href="https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523" target="_blank"&gt;https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 19 Jun 2024 14:31:21 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-help-to-use-the-distinct-values-of-a-measure-in-another/m-p/4000337#M155803</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2024-06-19T14:31:21Z</dc:date>
    </item>
    <item>
      <title>Re: DAX help to use the distinct values of a measure in another measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-help-to-use-the-distinct-values-of-a-measure-in-another/m-p/4002182#M156033</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for the help.&lt;/P&gt;&lt;P&gt;I made a mockup of the report to include the current measure I have.&lt;/P&gt;&lt;P&gt;Basically, the measure for the coefficient is related to the selected Period chosen by the user in the slicer.&lt;/P&gt;&lt;P&gt;I also added another slicer with an "AREA" field, as I have to include an AREA option in my actual report, so that the user can chose to pick what the coefficients look like for area A or area B if they want to.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For the expected result, since I didn't manage to create the measure, I ended up exporting the matrix for each selected "Period", and do it manually on Excel, so I'm including this file as well. I calculated the desired outcome for each possible selected case (Period = 6, Period = 12, etc.)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://we.tl/t-JwpRCw3MCu" target="_blank"&gt;https://we.tl/t-JwpRCw3MCu&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please tell me if this sample is not enough/if something else is needed to explain myself better.&lt;/P&gt;</description>
      <pubDate>Thu, 20 Jun 2024 13:58:39 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-help-to-use-the-distinct-values-of-a-measure-in-another/m-p/4002182#M156033</guid>
      <dc:creator>engel_baut</dc:creator>
      <dc:date>2024-06-20T13:58:39Z</dc:date>
    </item>
  </channel>
</rss>

