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
jwodecki
New Member

Count of Rows in a Card that contain a flag via Measure formula

I have a table of rows with an Id and a Year-Month stamp. I created 2 disconnected slicers, one for the year and one for the month.

 

jwodecki_1-1687457980086.png

 

I then created a Measure that will flag any row that contains the Year-Month selected within the slicer. There can be multiple stamps for each Id, which is why I cannot break out the Year and Month on it's own within the data table. 

 

When I create a Table visual, I can slice and dice with no issues. It gives me everything I need. The issue is I would like to use a Card visual so I can just get a count of how many Ids fall within each selection. Admittedly I am an Excel guy and am trying to learn BI. This one has me super confused. 

 

jwodecki_0-1687457732463.png

In the screenshot above, you can see I have 3 rows in the table, but the card shows a count of 12 (which is all rows). 

 

I attached some sample data hoping someone can assist. I expect there's some kind of sum/count formula I'm missing. I just don't know where or how to apply whatever it may be. 

 

Sample Data: https://www.dropbox.com/s/im9kg17v5y8n3b9/sample_data_bi.pbix?dl=0

 

First time posting, please let me know if there's a better way of sharing sample data. It wouldn't let me attach a .pbix to this post

1 ACCEPTED SOLUTION
jwodecki
New Member

Figured this out by creating a Measure that references my initial Measure, and using that in the Card.

 

MQL Count =
CALCULATE(COUNTROWS('Lead'),FILTER('Lead','Lead'[Measure]>0))
 

View solution in original post

1 REPLY 1
jwodecki
New Member

Figured this out by creating a Measure that references my initial Measure, and using that in the Card.

 

MQL Count =
CALCULATE(COUNTROWS('Lead'),FILTER('Lead','Lead'[Measure]>0))
 

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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