Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hi All,
I am trying to compare the total count difference of policies per company with AND without the slicer.
Here is a simple example of my scenario:
| Compnay Name | Policy Number | Filter X | Filter Y |
| Company A | 123 | True | False |
| Company A | 456 | False | False |
| Company A | 789 | False | True |
| Company A | 123 | False | False |
| Company A | 050 | True | True |
Therefore, If Slicer X is set to True and slicer Y is set to False, I expect to get 25% for Company A (1 distinct policy which satisfies the filters divided by total of 4 distinct policies for company A). The point here is that the denomitor should be always constant regardless of filter values.
Solved! Go to Solution.
Policies by company = DIVIDE( DISTINCTCOUNT(MyTable[PolicyNumber]) , CALCULATE( DISTINCTCOUNT(MyTable[PolicyNumber]), ALL(MyTable[Filter X]), ALL(MyTable[Filter Y])))
The numerator applies the whole filter context, the denominator replaces Filter X and Filter Y with all the values for both.
Policies by company = DIVIDE( DISTINCTCOUNT(MyTable[PolicyNumber]) , CALCULATE( DISTINCTCOUNT(MyTable[PolicyNumber]), ALL(MyTable[Filter X]), ALL(MyTable[Filter Y])))
The numerator applies the whole filter context, the denominator replaces Filter X and Filter Y with all the values for both.
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 60 | |
| 43 | |
| 40 | |
| 36 | |
| 21 |
| User | Count |
|---|---|
| 178 | |
| 122 | |
| 107 | |
| 77 | |
| 50 |