<?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 Which Power BI Dax function should I use to calculate? in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Which-Power-BI-Dax-function-should-I-use-to-calculate/m-p/4322878#M171617</link>
    <description>&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;Like Calculate, I would like to express the calculation for Target as follows.&lt;/P&gt;&lt;P&gt;Subcategories such as A-1 and B-1 are &lt;STRONG&gt;Quantity / Hours&lt;/STRONG&gt;, and upper classifications such as A and B are calculated as &lt;STRONG&gt;target sum of the subcategories&lt;/STRONG&gt;.&lt;BR /&gt;How do I write a Dax function?&lt;/P&gt;</description>
    <pubDate>Wed, 11 Dec 2024 05:22:39 GMT</pubDate>
    <dc:creator>sumin</dc:creator>
    <dc:date>2024-12-11T05:22:39Z</dc:date>
    <item>
      <title>Which Power BI Dax function should I use to calculate?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Which-Power-BI-Dax-function-should-I-use-to-calculate/m-p/4322878#M171617</link>
      <description>&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;Like Calculate, I would like to express the calculation for Target as follows.&lt;/P&gt;&lt;P&gt;Subcategories such as A-1 and B-1 are &lt;STRONG&gt;Quantity / Hours&lt;/STRONG&gt;, and upper classifications such as A and B are calculated as &lt;STRONG&gt;target sum of the subcategories&lt;/STRONG&gt;.&lt;BR /&gt;How do I write a Dax function?&lt;/P&gt;</description>
      <pubDate>Wed, 11 Dec 2024 05:22:39 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Which-Power-BI-Dax-function-should-I-use-to-calculate/m-p/4322878#M171617</guid>
      <dc:creator>sumin</dc:creator>
      <dc:date>2024-12-11T05:22:39Z</dc:date>
    </item>
    <item>
      <title>Re: Which Power BI Dax function should I use to calculate?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Which-Power-BI-Dax-function-should-I-use-to-calculate/m-p/4322972#M171625</link>
      <description>&lt;P&gt;hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="899051" data-lia-user-login="sumin" class="lia-mention lia-mention-user"&gt;sumin&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;DAX could be very tricky handling hierrachies.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In best case, it can be as easy as :&lt;/P&gt;
&lt;P&gt;measure = DIVIDE ( SUM(data[quantity]),&amp;nbsp;SUM(data[Hours]))&lt;/P&gt;</description>
      <pubDate>Wed, 11 Dec 2024 06:07:22 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Which-Power-BI-Dax-function-should-I-use-to-calculate/m-p/4322972#M171625</guid>
      <dc:creator>FreemanZ</dc:creator>
      <dc:date>2024-12-11T06:07:22Z</dc:date>
    </item>
    <item>
      <title>Re: Which Power BI Dax function should I use to calculate?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Which-Power-BI-Dax-function-should-I-use-to-calculate/m-p/4323241#M171633</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Thank you for the answer, but it's not the result I want. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Subcategories is possible in that way, but I want to express the upper categories as the sum of the values of the subcategories.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 11 Dec 2024 07:46:10 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Which-Power-BI-Dax-function-should-I-use-to-calculate/m-p/4323241#M171633</guid>
      <dc:creator>sumin</dc:creator>
      <dc:date>2024-12-11T07:46:10Z</dc:date>
    </item>
    <item>
      <title>Re: Which Power BI Dax function should I use to calculate?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Which-Power-BI-Dax-function-should-I-use-to-calculate/m-p/4325544#M171727</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="899051" data-lia-user-login="sumin" class="lia-mention lia-mention-user"&gt;sumin&lt;/a&gt;,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks for reaching out Microsoft Fabric community Forum&lt;/P&gt;
&lt;P&gt;For calculating Target =Quantity/Hours create a calculated column use the below DAX Formula&lt;/P&gt;
&lt;P&gt;Subcategory Target =&lt;/P&gt;
&lt;P&gt;IF(&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; CONTAINSSTRING('Sheet2'[Name], "-"),&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; 'Sheet2'[Quantity] / 'Sheet2'[Hours],&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; BLANK()&lt;/P&gt;
&lt;P&gt;)&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For calculating Sum of A Target Use below DAX measure&lt;/P&gt;
&lt;P&gt;Sum of A Target =&lt;/P&gt;
&lt;P&gt;CALCULATE (&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; SUM ( 'Sheet2'[Subcategory Target]),&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; FILTER (&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 'Sheet2',&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 'Sheet2'[Name] = "A-1" || 'Sheet2'[Name] = "A-2" || 'Sheet2'[Name] = "A-3"&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; )&lt;/P&gt;
&lt;P&gt;)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For calculating Sum of B &amp;nbsp;Target Use below DAX measure&lt;/P&gt;
&lt;P&gt;Sum of B Target =&lt;/P&gt;
&lt;P&gt;CALCULATE (&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; SUM ( 'Sheet2'[Target] ),&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; FILTER (&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 'Sheet2',&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 'Sheet2'[Name] = "B-1" || 'Sheet2'[Name] = "B-2"&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; )&lt;/P&gt;
&lt;P&gt;)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I implemented the solution using the given sample provided by you with the above DAX formula. For better understanding, I am attaching an image below.&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If this post&amp;nbsp;&lt;EM&gt;helps&lt;/EM&gt;, then please give us Kudos and consider&amp;nbsp;&lt;STRONG&gt;&lt;EM&gt;Accept it as a solution&lt;/EM&gt;&lt;/STRONG&gt;&amp;nbsp;to help the other members find it more quickly.&lt;/P&gt;
&lt;P&gt;Thank you&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 12 Dec 2024 11:08:21 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Which-Power-BI-Dax-function-should-I-use-to-calculate/m-p/4325544#M171727</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-12-12T11:08:21Z</dc:date>
    </item>
    <item>
      <title>Re: Which Power BI Dax function should I use to calculate?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Which-Power-BI-Dax-function-should-I-use-to-calculate/m-p/4325731#M171731</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="899051" data-lia-user-login="sumin" class="lia-mention lia-mention-user"&gt;sumin&lt;/a&gt;,&amp;nbsp;&lt;/P&gt;&lt;P&gt;first you shoud create a sub-category column.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and create measure.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Sum traget = IF(ISINSCOPE('Table (5)'[sub-category]),SUM('Table (5)'[target]))&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 12 Dec 2024 10:41:31 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Which-Power-BI-Dax-function-should-I-use-to-calculate/m-p/4325731#M171731</guid>
      <dc:creator>vivek31</dc:creator>
      <dc:date>2024-12-12T10:41:31Z</dc:date>
    </item>
    <item>
      <title>Re: Which Power BI Dax function should I use to calculate?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Which-Power-BI-Dax-function-should-I-use-to-calculate/m-p/4334287#M172084</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="899051" data-lia-user-login="sumin" class="lia-mention lia-mention-user"&gt;sumin&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;SPAN data-teams="true"&gt;Thank you for your patience. From the steps outlined below, please let us know if anything was helpful to you, so that we can convert it into a formal answer. If so, we would appreciate it if you could &lt;STRONG&gt;Accept it as a solution&lt;/STRONG&gt; and drop a '&lt;STRONG&gt;Kudos&lt;/STRONG&gt;' so other members can find it more easily.&lt;BR /&gt;Thank you.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 23 Dec 2024 17:24:16 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Which-Power-BI-Dax-function-should-I-use-to-calculate/m-p/4334287#M172084</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-12-23T17:24:16Z</dc:date>
    </item>
    <item>
      <title>Re: Which Power BI Dax function should I use to calculate?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Which-Power-BI-Dax-function-should-I-use-to-calculate/m-p/4341512#M172406</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="899051" data-lia-user-login="sumin" class="lia-mention lia-mention-user"&gt;sumin&lt;/a&gt;&amp;nbsp;&lt;SPAN data-teams="true"&gt;&lt;BR /&gt;I wanted to check if you had the opportunity to review the information provided. Please feel free to contact us if you have any further questions. If my response has addressed your query, please accept it as a solution and give a 'Kudos' so other members can easily find it.&lt;BR /&gt;Thank you.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 24 Dec 2024 04:49:55 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Which-Power-BI-Dax-function-should-I-use-to-calculate/m-p/4341512#M172406</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-12-24T04:49:55Z</dc:date>
    </item>
    <item>
      <title>Re: Which Power BI Dax function should I use to calculate?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Which-Power-BI-Dax-function-should-I-use-to-calculate/m-p/4345165#M172545</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="899051" data-lia-user-login="sumin" class="lia-mention lia-mention-user"&gt;sumin&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;SPAN&gt;We haven’t heard back since our last response and wanted to check if your query has been resolved. If not, please feel free to reach out for further assistance. If it has been resolved, kindly mark the helpful reply as the solution to make it easier for others to find. A kudos would also be greatly appreciated!&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 28 Dec 2024 14:50:11 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Which-Power-BI-Dax-function-should-I-use-to-calculate/m-p/4345165#M172545</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-12-28T14:50:11Z</dc:date>
    </item>
  </channel>
</rss>

