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,
In a card visual, I have used a measure which takes the distinct count of product no. Now in additional to that, I have to include a logic to get the distinct count of product no where Actuals + Forecast > 0. In the below example, the distinct count of product no where Actuals + Forecast > 0 is 4. This logic I need to achieve in a Card visual. Can anybody help me with the logic here?
| Product No | Actuals | Forecast |
| 1 | 0 | 30 |
| 2 | 0 | 0 |
| 3 | 65 | 100 |
| 4 | 50 | 0 |
| 5 | 0 | 0 |
| 6 | 100 | 150 |
Thanks in advance!!
Solved! Go to Solution.
HI @MadhumithaV_26,
I'd like to suggest you extract the 'product no' field values based on filter conditions, then you can use countrows function with these field values to get the count.
formula =
CALCULATE (
COUNTROWS ( VALUES ( Table[Product No] ) ),
FILTER ( ALLSELECTED ( Table ), [Actual] + [Forecast] > 0 )
)
Regards,
Xiaoxin Sheng
HI @MadhumithaV_26,
I'd like to suggest you extract the 'product no' field values based on filter conditions, then you can use countrows function with these field values to get the count.
formula =
CALCULATE (
COUNTROWS ( VALUES ( Table[Product No] ) ),
FILTER ( ALLSELECTED ( Table ), [Actual] + [Forecast] > 0 )
)
Regards,
Xiaoxin Sheng
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 |
|---|---|
| 21 | |
| 10 | |
| 9 | |
| 4 | |
| 4 |
| User | Count |
|---|---|
| 35 | |
| 31 | |
| 19 | |
| 13 | |
| 10 |