<?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 to get the relative value? Model attached in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-get-the-relative-value-Model-attached/m-p/3459060#M131898</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm trying to wrap my head around this. I've attached the model here: &lt;A href="https://drive.google.com/file/d/1yIC3LKIDAaCzr5LbQyg5k6w2p4poSNB3/view?usp=sharing" target="_blank" rel="noopener"&gt;https://drive.google.com/file/d/1yIC3LKIDAaCzr5LbQyg5k6w2p4poSNB3/view?usp=sharing&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Also see screenshot of the model below and the expected end result.&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;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The expected result is a bar chart where you can filter on project, supplier name and date. The Y-axis will be sales for the total number of projects and the X-axis will be dates based on project starts.&amp;nbsp;&lt;SPAN&gt;Example: the value of project id 1 is 10 700, and the value of the project start in 2024-05-08 is 3 * 10 700 = 32 100. So:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;The Sales table will calculate the volume per project by multiplying Sales[Price] and Sales[Quantity]&lt;/LI&gt;&lt;LI&gt;The additional step is that the measure must also multiply the volume from Sales with the Number of starts in the DimProjectPlan table. Meaning: the volume for Sales is only for one (1) project start, but the correct sum would be Sales[Price] * Sales[Quantity] * DimProjectPlan[Number of starts] as the same project may be sold more than one time. This is the Y-axis.&amp;nbsp;&lt;/LI&gt;&lt;LI&gt;The X-axis in the chart will be the date from DimProjectPlan[Date] as this shows when each project starts&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Data&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Sales contain price, quantity, project id, project, sub-project, suppliers. Duplicates&lt;/LI&gt;&lt;LI&gt;DimProject is a list of project id, project, sub-project. No duplicates&lt;/LI&gt;&lt;LI&gt;DimProjectPlan is a list of project id, project, sub-project, number of projects, start date. Duplicates&amp;nbsp;&lt;/LI&gt;&lt;LI&gt;DimSupplier is a unique list of suppliers. No duplicates&amp;nbsp;&lt;/LI&gt;&lt;LI&gt;Calendar&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Thanks for any help&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 05 Oct 2023 06:39:26 GMT</pubDate>
    <dc:creator>carlenb</dc:creator>
    <dc:date>2023-10-05T06:39:26Z</dc:date>
    <item>
      <title>How to get the relative value? Model attached</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-get-the-relative-value-Model-attached/m-p/3459060#M131898</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm trying to wrap my head around this. I've attached the model here: &lt;A href="https://drive.google.com/file/d/1yIC3LKIDAaCzr5LbQyg5k6w2p4poSNB3/view?usp=sharing" target="_blank" rel="noopener"&gt;https://drive.google.com/file/d/1yIC3LKIDAaCzr5LbQyg5k6w2p4poSNB3/view?usp=sharing&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Also see screenshot of the model below and the expected end result.&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;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The expected result is a bar chart where you can filter on project, supplier name and date. The Y-axis will be sales for the total number of projects and the X-axis will be dates based on project starts.&amp;nbsp;&lt;SPAN&gt;Example: the value of project id 1 is 10 700, and the value of the project start in 2024-05-08 is 3 * 10 700 = 32 100. So:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;The Sales table will calculate the volume per project by multiplying Sales[Price] and Sales[Quantity]&lt;/LI&gt;&lt;LI&gt;The additional step is that the measure must also multiply the volume from Sales with the Number of starts in the DimProjectPlan table. Meaning: the volume for Sales is only for one (1) project start, but the correct sum would be Sales[Price] * Sales[Quantity] * DimProjectPlan[Number of starts] as the same project may be sold more than one time. This is the Y-axis.&amp;nbsp;&lt;/LI&gt;&lt;LI&gt;The X-axis in the chart will be the date from DimProjectPlan[Date] as this shows when each project starts&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Data&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Sales contain price, quantity, project id, project, sub-project, suppliers. Duplicates&lt;/LI&gt;&lt;LI&gt;DimProject is a list of project id, project, sub-project. No duplicates&lt;/LI&gt;&lt;LI&gt;DimProjectPlan is a list of project id, project, sub-project, number of projects, start date. Duplicates&amp;nbsp;&lt;/LI&gt;&lt;LI&gt;DimSupplier is a unique list of suppliers. No duplicates&amp;nbsp;&lt;/LI&gt;&lt;LI&gt;Calendar&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Thanks for any help&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 05 Oct 2023 06:39:26 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-get-the-relative-value-Model-attached/m-p/3459060#M131898</guid>
      <dc:creator>carlenb</dc:creator>
      <dc:date>2023-10-05T06:39:26Z</dc:date>
    </item>
    <item>
      <title>Re: How to get the relative value? Model attached</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-get-the-relative-value-Model-attached/m-p/3461079#M132017</link>
      <description>&lt;P&gt;Added the following example in the thread start:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;The value of project id 1 is 10 700, and the value of the project start in 2024-05-08 is 3 * 10 700 = 32 100.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 05 Oct 2023 06:40:01 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-get-the-relative-value-Model-attached/m-p/3461079#M132017</guid>
      <dc:creator>carlenb</dc:creator>
      <dc:date>2023-10-05T06:40:01Z</dc:date>
    </item>
    <item>
      <title>Re: How to get the relative value? Model attached</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-get-the-relative-value-Model-attached/m-p/3461691#M132043</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="617109" data-lia-user-login="carlenb" class="lia-mention lia-mention-user"&gt;carlenb&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;Please refr to attached&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;Sales Volumne = 
SUMX ( 
    VALUES ( DimProject[ID] ),
    SUMX ( 
        CALCULATETABLE ( Sales ),
        Sales[Quantity] * Sales[Price]
    )
        * CALCULATE ( MAX ( DimProjectPlan[Number of starts] ) )
)&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 05 Oct 2023 13:12:22 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-get-the-relative-value-Model-attached/m-p/3461691#M132043</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2023-10-05T13:12:22Z</dc:date>
    </item>
    <item>
      <title>Re: How to get the relative value? Model attached</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-get-the-relative-value-Model-attached/m-p/3461886#M132045</link>
      <description>&lt;P&gt;Many thanks&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="317289" data-lia-user-login="tamerj1" class="lia-mention lia-mention-user"&gt;tamerj1&lt;/a&gt;&amp;nbsp;- I got it to work as expected &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; thanks for submitting the solution as well!&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 05 Oct 2023 14:34:09 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-get-the-relative-value-Model-attached/m-p/3461886#M132045</guid>
      <dc:creator>carlenb</dc:creator>
      <dc:date>2023-10-05T14:34:09Z</dc:date>
    </item>
  </channel>
</rss>

