Don't miss your chance to take exam DP-600 or DP-700 on us!
Request nowLearn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now
I have a sale table that looks like this:
| BookingDate | ShopId | ArticleId | QtyPieces |
| 10/05/2023 | 704788 | 31452 | 6 |
| 10/05/2023 | 704788 | 30891 | 1 |
| 10/05/2023 | 704788 | 30544 | 10 |
And would like to know how many shops have sold at least 4 total quantity for each of the articles
My matrix is setup as following
the values are:
Distinct count of shops, sum of QtyPieces and Distinct count of shops where at least 4 of the article is sold.
CALCULATE(
DISTINCTCOUNT(F_Sales_22May23[ClientId]),
FILTER(
F_Sales_22May23,
SUM(F_Sales_22May23[QtyPieces])> 4
)
)
the result is
because the formulla evaluates for each filter context individually, the number of distinct shops = number of shops with at least 4 in quantity sales.
How do i rewrite the formulla so the totals only count shops that have less than 4 Qty sales.
Instead of
FILTER(
F_Sales_22May23,
SUM(F_Sales_22May23[QtyPieces])> 4
)
use
FILTER(
F_Sales_22May23,
[QtyPieces]> 4
)
or
F_Sales_22May23[QtyPieces]> 4
Same with the <4 approach.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
Check out the February 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 7 | |
| 7 | |
| 6 | |
| 5 | |
| 5 |