<?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 Count of jobs when country and client is selected in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-of-jobs-when-country-and-client-is-selected/m-p/4380580#M173898</link>
    <description>&lt;P&gt;Can anyone help me with dax for total count of jobs when company and client is selected in slicer . I have job table with job number column , company table with company name column and client table with client name .All the dimensions tables are related to job actual fact table by job key , company key and client key&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sat, 25 Jan 2025 06:26:41 GMT</pubDate>
    <dc:creator>ODeb</dc:creator>
    <dc:date>2025-01-25T06:26:41Z</dc:date>
    <item>
      <title>Count of jobs when country and client is selected</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-of-jobs-when-country-and-client-is-selected/m-p/4380580#M173898</link>
      <description>&lt;P&gt;Can anyone help me with dax for total count of jobs when company and client is selected in slicer . I have job table with job number column , company table with company name column and client table with client name .All the dimensions tables are related to job actual fact table by job key , company key and client key&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 25 Jan 2025 06:26:41 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-of-jobs-when-country-and-client-is-selected/m-p/4380580#M173898</guid>
      <dc:creator>ODeb</dc:creator>
      <dc:date>2025-01-25T06:26:41Z</dc:date>
    </item>
    <item>
      <title>Re: Count of jobs when country and client is selected</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-of-jobs-when-country-and-client-is-selected/m-p/4380735#M173900</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="919050" data-lia-user-login="ODeb" class="lia-mention lia-mention-user"&gt;ODeb&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To calculate the total count of jobs when a company and client are selected in slicers, you can create a DAX measure that respects the filters applied by these slicers. Given your data model, where the Job Table is related to the Company Table and Client Table via their respective keys (Job Key, Company Key, and Client Key), the measure can be written to count the rows in the Job Table that remain after applying the slicer filters.&lt;/P&gt;
&lt;P&gt;The DAX measure for this can be written as:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Total Jobs = COUNTROWS('Job Table')
&lt;/LI-CODE&gt;
&lt;P&gt;This measure counts the number of rows in the Job Table. The slicers, placed on Company Name (from the Company Table) and Client Name (from the Client Table), automatically filter the data model. These filters propagate through the relationships to the Job Table, ensuring that only the relevant rows corresponding to the selected company and client are included in the count.&lt;/P&gt;
&lt;P&gt;To implement this, ensure that your relationships between the tables are correctly defined in the model. Once the measure is created, you can add it to a card visual or any other visual in Power BI to display the total count of jobs based on the slicer selections.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best regards,&lt;/P&gt;</description>
      <pubDate>Sat, 25 Jan 2025 11:23:43 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-of-jobs-when-country-and-client-is-selected/m-p/4380735#M173900</guid>
      <dc:creator>DataNinja777</dc:creator>
      <dc:date>2025-01-25T11:23:43Z</dc:date>
    </item>
    <item>
      <title>Re: Count of jobs when country and client is selected</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-of-jobs-when-country-and-client-is-selected/m-p/4380910#M173909</link>
      <description>&lt;P&gt;Job , Company and client are the dimensions Job Actual table is the fact table and connected by respective keys &amp;nbsp;to dimension table ..&lt;/P&gt;</description>
      <pubDate>Sat, 25 Jan 2025 17:41:36 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-of-jobs-when-country-and-client-is-selected/m-p/4380910#M173909</guid>
      <dc:creator>ODeb</dc:creator>
      <dc:date>2025-01-25T17:41:36Z</dc:date>
    </item>
    <item>
      <title>Re: Count of jobs when country and client is selected</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-of-jobs-when-country-and-client-is-selected/m-p/4381700#M173946</link>
      <description>&lt;P&gt;Thank you&amp;nbsp;DataNinja777&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hi,&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="919050" data-lia-user-login="ODeb" class="lia-mention lia-mention-user"&gt;ODeb&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Based on your description, I've created this sample dataset below:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;Use two dimension tables to build two slicers:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;Establish the following measure:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Jobs Count = 
CALCULATE(
    COUNT('Job'[Job Number]),
    ALLSELECTED('Company'[Company Name]),
    ALLSELECTED('Client'[Client Name])
)&lt;/LI-CODE&gt;
&lt;P&gt;Here are the results:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;I've provided the PBIX file used this time below.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="margin-bottom: 6.0pt;"&gt;&lt;SPAN&gt;Best Regards&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="margin-bottom: 6.0pt;"&gt;&lt;SPAN&gt;Jianpeng &lt;/SPAN&gt;&lt;SPAN&gt;Li&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="margin-bottom: 6.0pt;"&gt;&lt;SPAN&gt;If this post &lt;STRONG&gt;&lt;I&gt;helps&lt;/I&gt;&lt;/STRONG&gt;, then please consider &lt;STRONG&gt;&lt;I&gt;Accept it as the solution&lt;/I&gt;&lt;/STRONG&gt;&amp;nbsp;to help the other members find it more quickly.&lt;/SPAN&gt;&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>Mon, 27 Jan 2025 05:24:06 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-of-jobs-when-country-and-client-is-selected/m-p/4381700#M173946</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2025-01-27T05:24:06Z</dc:date>
    </item>
  </channel>
</rss>

