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

Microsoft is giving away 50,000 FREE Microsoft Certification exam vouchers. Get Fabric certified for FREE! Learn more

Reply
rahulvyas
Frequent Visitor

How to count number of rows on a measure which gives true or false value?

I have created true or false measures out of a 2 different measure 

 

For example: Cash holding if(measure1>measure2, 0,1). 

 

I am trying to count how many numbers of 1 we got as a card visual but nothing seems to be working. Does anyone have any other way? When I select the Card visual it does not give the proper count. 

 

rahulvyas_0-1650648690188.png

 

1 ACCEPTED SOLUTION

@rahulvyas 

I thought you said true/false output. No issues. Try

you my try

SUMX ( 

VALUES ( Table[PostDate] ),

[Cash_Holding_Over_Under]

)

View solution in original post

3 REPLIES 3
tamerj1
Super User
Super User

Hi @rahulvyas 

you my try

SUMX ( 

VALUES ( Table[PostDate] ),

CALCULATE (

IF (

[Cash_Holding_Over_Under] = TRUE (), 

1

)

)

)

Does not work. Getting the error. I also check the format and its a "Whole Number"

rahulvyas_0-1650649721101.png

 

 

@rahulvyas 

I thought you said true/false output. No issues. Try

you my try

SUMX ( 

VALUES ( Table[PostDate] ),

[Cash_Holding_Over_Under]

)

Helpful resources

Announcements
March PBI video - carousel

Power BI Monthly Update - March 2025

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

March2025 Carousel

Fabric Community Update - March 2025

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

Top Kudoed Authors