Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
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
Solved! Go to Solution.
Thank you DataNinja777
Hi, @ODeb
Based on your description, I've created this sample dataset below:
Use two dimension tables to build two slicers:
Establish the following measure:
Jobs Count =
CALCULATE(
COUNT('Job'[Job Number]),
ALLSELECTED('Company'[Company Name]),
ALLSELECTED('Client'[Client Name])
)
Here are the results:
I've provided the PBIX file used this time below.
Best Regards
Jianpeng Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Thank you DataNinja777
Hi, @ODeb
Based on your description, I've created this sample dataset below:
Use two dimension tables to build two slicers:
Establish the following measure:
Jobs Count =
CALCULATE(
COUNT('Job'[Job Number]),
ALLSELECTED('Company'[Company Name]),
ALLSELECTED('Client'[Client Name])
)
Here are the results:
I've provided the PBIX file used this time below.
Best Regards
Jianpeng Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Job , Company and client are the dimensions Job Actual table is the fact table and connected by respective keys to dimension table ..
Hi @ODeb ,
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.
The DAX measure for this can be written as:
Total Jobs = COUNTROWS('Job Table')
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.
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.
Best regards,
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
21 | |
15 | |
15 | |
11 | |
7 |
User | Count |
---|---|
25 | |
24 | |
12 | |
12 | |
11 |