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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

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
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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

Top Solution Authors