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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

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
v-shex-msft
Community Support
Community Support

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

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

View solution in original post

1 REPLY 1
v-shex-msft
Community Support
Community Support

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

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.