Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
I have two tables in my power bi model:
a. SalesFact table which contains sales per employee by dates and b.SalesEmployees which hold the salesperson's details
My goal is to show for each date a list of the salesperson with no sales on that date. (page has date slicer)
to calculate this "anti join" table I wrote this table function:
antijoin table =
EXCEPT (
SELECTCOLUMNS ( SalesPersons, "ID", SalesPersons[worker id] ),
SELECTCOLUMNS ( 'Salesfact', "ID", 'Salesfact'[worker id] )
)
The problem here is that the function does not take the user selection of date slicer into consideration
meaning it is calculating the anti join between the whole SalesFact table and SalesEmployees table regardless of the date chosen
how can I achieve my desired goal?
Solved! Go to Solution.
Hi @Adidas ,
I think this is what you want.
Pbix file is attached with the solution
https://community.powerbi.com/t5/Desktop/Count-of-Customers-with-no-Sales/td-p/589155
Regards,
Harsh Nathani
Did I answer your question? Mark my post as a solution! Appreciate with a Kudos!! (Click the Thumbs Up Button)
Hi @Adidas ,
I think this is what you want.
Pbix file is attached with the solution
https://community.powerbi.com/t5/Desktop/Count-of-Customers-with-no-Sales/td-p/589155
Regards,
Harsh Nathani
Did I answer your question? Mark my post as a solution! Appreciate with a Kudos!! (Click the Thumbs Up Button)
Thank you all for your kind help
it works fine now
@Adidas , you can use inside a measure, but costly stuff for measure
antijoin table =
countx(
EXCEPT (
SELECTCOLUMNS ( SalesPersons, "ID", SalesPersons[worker id] ),
SELECTCOLUMNS ( 'Salesfact', "ID", 'Salesfact'[worker id] )
) ,[worker id] )
Thanks amitchandak
I created the measure as you suggested
Hi
forgot to mention I'm on a direct query mode
cant use the query editor here
I should perform it by pure dax
Hi @Adidas ,
See if these help you
https://curbal.com/blog/joining-table-in-power-bi-with-power-query-and-dax
https://www.tutorialgateway.org/joins-in-power-bi/
Regards,
Harsh Nathani
Did I answer your question? Mark my post as a solution! Appreciate with a Kudos!! (Click the Thumbs Up Button)
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
15 | |
11 | |
11 | |
10 | |
10 |
User | Count |
---|---|
19 | |
14 | |
13 | |
11 | |
8 |