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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

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
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.