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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
LValencia
New Member

Counting rows of "1" values depending on the result of a measurement

Hello,

I have the following measures in a measures table:

TotalPoints = 54890
TotalPointsBlue = 16340
TotalPointsBlueLight =7450

 

And a "EventPoints" table
Event   Action
event1    1
event2    1
event3    0
event4    1
event5    0
event6    1
event7    0

How can I create a measures that counts the "1" values of the Action column, filtering the records that belong to "TotalPointsBlue"?
I've created this measure, but it does not work
CALCULATE(COUNTROWS(EventPoints), IF(EventPoints[Action] = 1 && [TotalPointsBlue ] > 0, 1, 0)

 

 

Plaese, can you help me?

 

 

2 REPLIES 2
AjithPrasath
Resolver II
Resolver II

@LValencia 

 

Try this

CountActionBlue = 
CALCULATE(
    COUNTROWS(EventPoints),
    EventPoints[Action] = 1,
    EventPoints[Event] IN VALUES(EventPoints[Event]),
    [TotalPointsBlue] > 0
)

Hi @AjithPrasath, it doesn't work either.

Error: A placeholder function has been used in a true/false expression that is used as a table filter expression, which is not permitted.

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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