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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
MAP
Regular Visitor

Zero counts

I have stock exchange data in power bi.i have a measure that calculates whether closing price is maximum or not.if closing price is maximum this measure gives to the answer equall to zero.Now I want to count those zero in a separate measures

1 ACCEPTED SOLUTION
RossEdwards
Solution Specialist
Solution Specialist

You could do this using SUMX and VALUES.  First you'll need to understand what groupings will let you check a zero for.  Maybe its a particular stockcode.  Here is an example:

Zero Count = SUMX(
    VALUES('Stocks'[Stock Code]),
    IF([Closing price max check] = 0, 1, 0)
)

View solution in original post

2 REPLIES 2
MAP
Regular Visitor

Thank You Sir

RossEdwards
Solution Specialist
Solution Specialist

You could do this using SUMX and VALUES.  First you'll need to understand what groupings will let you check a zero for.  Maybe its a particular stockcode.  Here is an example:

Zero Count = SUMX(
    VALUES('Stocks'[Stock Code]),
    IF([Closing price max check] = 0, 1, 0)
)

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

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

MayPowerBICarousel

Fabric Monthly Update - May 2024

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

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

Top Solution Authors