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

Get inspired! Check out the entries from the Power BI DataViz World Championships preliminary rounds and give kudos to your favorites. View the vizzies.

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
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code FABINSIDER for a $400 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

Check out the February 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.