<?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 Dax calculation to filter out values basis on scenarios given in the same table in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-calculation-to-filter-out-values-basis-on-scenarios-given-in/m-p/3030695#M103554</link>
    <description>&lt;P&gt;Hi everyone,&lt;BR /&gt;I have a table_1 which has columns ( qty, procurement,week)&lt;BR /&gt;so under qty there are values, Under procurement we have different categories (1,2,3,4). Under week we have ( week 1-20)&lt;BR /&gt;So I have to create a measure to get a value when,&lt;BR /&gt;[( Values from qty which are of 2nd category only and week from 11-16 only (subtract) Values from qty which are of 4th category and week from 11-16 only ( divide)&amp;nbsp;Values from qty which are of 2nd category only and week from 11-16 only ]&lt;BR /&gt;Pardon me If I am not conveying it in proper way as I am new to the community and powerbi.&lt;BR /&gt;Thanks&amp;nbsp;&lt;BR /&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="148838" data-lia-user-login="amitchandak" class="lia-mention lia-mention-user"&gt;amitchandak&lt;/a&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 19 Jan 2023 08:41:31 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2023-01-19T08:41:31Z</dc:date>
    <item>
      <title>Dax calculation to filter out values basis on scenarios given in the same table</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-calculation-to-filter-out-values-basis-on-scenarios-given-in/m-p/3030695#M103554</link>
      <description>&lt;P&gt;Hi everyone,&lt;BR /&gt;I have a table_1 which has columns ( qty, procurement,week)&lt;BR /&gt;so under qty there are values, Under procurement we have different categories (1,2,3,4). Under week we have ( week 1-20)&lt;BR /&gt;So I have to create a measure to get a value when,&lt;BR /&gt;[( Values from qty which are of 2nd category only and week from 11-16 only (subtract) Values from qty which are of 4th category and week from 11-16 only ( divide)&amp;nbsp;Values from qty which are of 2nd category only and week from 11-16 only ]&lt;BR /&gt;Pardon me If I am not conveying it in proper way as I am new to the community and powerbi.&lt;BR /&gt;Thanks&amp;nbsp;&lt;BR /&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="148838" data-lia-user-login="amitchandak" class="lia-mention lia-mention-user"&gt;amitchandak&lt;/a&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 19 Jan 2023 08:41:31 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-calculation-to-filter-out-values-basis-on-scenarios-given-in/m-p/3030695#M103554</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-01-19T08:41:31Z</dc:date>
    </item>
    <item>
      <title>Re: Dax calculation to filter out values basis on scenarios given in the same table</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-calculation-to-filter-out-values-basis-on-scenarios-given-in/m-p/3030721#M103559</link>
      <description>&lt;P&gt;hi&amp;nbsp;Anonymous&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;try like:&lt;/P&gt;&lt;LI-CODE lang="python"&gt;Measure = 
VAR _value1 =
CALCULATE(
    SUM(TableName[qty]), 
    TableName[Procurement]=2, 
    TableName[week]&amp;gt;=11,
    TableName[week]&amp;lt;=16
)
VAR _value2 =
CALCULATE(
    SUM(TableName[qty]), 
    TableName[Procurement]=4, 
    TableName[week]&amp;gt;=11,
    TableName[week]&amp;lt;=16
)
RETURN
DIVIDE(_value1 - _value2, _value1)&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 19 Jan 2023 08:51:57 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-calculation-to-filter-out-values-basis-on-scenarios-given-in/m-p/3030721#M103559</guid>
      <dc:creator>FreemanZ</dc:creator>
      <dc:date>2023-01-19T08:51:57Z</dc:date>
    </item>
  </channel>
</rss>

