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!Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
I need some assistance repairing my formula to calculate rate in a table which has two visual-level filters. I have a year's worth of data loaded into the dataset, but would like this table/graph to only display the latest 60 days. I also want to exclude 2 categories from the numerator ('Count'), but include them in the denominator ('Total Count'). Currently, I'm doing this exclusion through a visual-level filter in the left table in the below example.
Rate = DISTINCTCOUNT(Table[Field_ID])
/
CALCULATE(DISTINCTCOUNT(Table[Field_ID]), ALL(Table[Category]))The formula is working fine, until I filter (or use relative date slicer) to the latest 60 days. How do I incorporate this within my formula to account for this? Do I need to add another condition for 'Day' in ALL or perhaps ALLEXCEPT?
In the example below, 'Rate' (left table) should equal 'Count' / 'Total Count' (from the right table). The first category with Count = 6351 and Total Count = 37839 should have Rate = 16.8%. However, the Rate is showing up as 35.5%.
When I remove the filter for latest 60 days, I get the proper rate of 16.8%.
Any assistance in updating my formula would be much appreciated! Please let me know if you need me to provide any further details.
Solved! Go to Solution.
@niko18033
Try Allselected() instead of ALL() for filtering.
Paul Zheng _ Community Support Team
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@niko18033
Try Allselected() instead of ALL() for filtering.
Paul Zheng _ Community Support Team
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@niko18033 Try using ALLEXCEPT instead of ALL. There is also KEEFILTERS and REMOVEFILTERS
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
| User | Count |
|---|---|
| 93 | |
| 81 | |
| 73 | |
| 46 | |
| 35 |