Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
MadhumithaV_26
Frequent Visitor

How to get the count of Products where actuals+forecast values are greater than 0 in a card visual?

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 NoActualsForecast
1030
200
365100
4500
500
6100150

 

Thanks in advance!!

1 ACCEPTED SOLUTION
Anonymous
Not applicable

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

View solution in original post

1 REPLY 1
Anonymous
Not applicable

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

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.