The ultimate Microsoft Fabric, Power BI, Azure AI, and SQL learning event: Join us in Stockholm, September 24-27, 2024.
Save €200 with code MSCUST on top of early bird pricing!
Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
I have two tables. One contains data related to inspections completed such as the Primary inspector, date, inspection number, and some other data that does not matter in this case. I need to count the inspections completed but I only want to count the ones that were completed by senior leaders in the organization. My second table contains 2 columns which lists the senior leaders, with their name in one column and their department in the other.
I had previously counted them using the following and then in the visual I filtered using the list of leaders and the relationship as a means to accomplishing my count, however i want to also display the inspections by leaders and another column showing inspections by non-leaders and that method of filtering won't work anymore.
Inspection ID | Primary Inspector | Date | Office | Region |
1234 | Fred K | 02-10-2021 | Edmonton | Northern Alberta |
2345 | Mike G | 03-02-2021 | Calgary | Southern Alberta |
3456 | Sheala K | 03-15-2021 | Guelph | Ontario |
4567 | Steph R | 04-10-2021 | Fort St. John | British Columbia |
Leaders Table
Leader | Department |
Fred K | Manufacturing |
Mike G | Purchasing |
Steph R | Warehouse |
Frank L | Office Services |
Any help would be greatly apreciated. This seems like it should be fairly easy but I cant get it to work for the life of me.
Solved! Go to Solution.
@BeardedCreeker
To get the leaders count:
leaders count =
COUNTROWS(
FILTER(
SUMMARIZE(Inspections,Inspections[Inspection ID],Inspections[Primary Inspector]),
Inspections[Primary Inspector] in VALUES(Leaders[Leader])
)
)
Non Leaders Count:
Non leaders count =
COUNTROWS(
FILTER(
SUMMARIZE(Inspections,Inspections[Inspection ID],Inspections[Primary Inspector]),
NOT Inspections[Primary Inspector] in VALUES(Leaders[Leader])
)
)
⭕ Subscribe and learn Power BI from these videos
⚪ Website ⚪ LinkedIn ⚪ PBI User Group
@BeardedCreeker
To get the leaders count:
leaders count =
COUNTROWS(
FILTER(
SUMMARIZE(Inspections,Inspections[Inspection ID],Inspections[Primary Inspector]),
Inspections[Primary Inspector] in VALUES(Leaders[Leader])
)
)
Non Leaders Count:
Non leaders count =
COUNTROWS(
FILTER(
SUMMARIZE(Inspections,Inspections[Inspection ID],Inspections[Primary Inspector]),
NOT Inspections[Primary Inspector] in VALUES(Leaders[Leader])
)
)
⭕ Subscribe and learn Power BI from these videos
⚪ Website ⚪ LinkedIn ⚪ PBI User Group
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Check out the August 2024 Power BI update to learn about new features.
User | Count |
---|---|
111 | |
82 | |
65 | |
53 | |
52 |
User | Count |
---|---|
128 | |
115 | |
80 | |
65 | |
63 |