Reply
rgouette
Helper I
Helper I
Partially syndicated - Outbound

Yet Another need to count rows after a filter is applied

I've searched for an example of exactly what I'm trying to do , and some come close.. It seem SO simple in theory to do..

I have a table visual based on a  SQL query.

I have table filter applied  of only fetching the TOP 50 rows(to help performance)

I also have a couple of visuals available to help fine tune results.

I simply want to display, via a card, the count of rows on the table visual, after any filter is applied

appreciate any help...

Regards,

Rich

 

1 ACCEPTED SOLUTION

Syndicated - Outbound
Not sure I completely understand why I'd apply a filter on the count card itself..

If you want to arrive at the same number you need to use the exact same filter context.

 

 

Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).
Do not include sensitive information. Do not include anything that is unrelated to the issue or question.
Please show the expected outcome based on the sample data you provided.

Need help uploading data? https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-...
Want faster answers? https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447...

View solution in original post

6 REPLIES 6
rgouette
Helper I
Helper I

Syndicated - Outbound

, found a "solution", which is to save the report & re-open. NOw have DAX editor.

Also, I cannot explain it...but the row counter works just fine now..

I just drop this into a new measure...:

rowCount = COUNTROWS(dbName)

and it all seems to work peachy if I search using my card is search visual...

who knows... I'm just happy it's working

 

Thanks,

R

 

 

 

 

rgouette
Helper I
Helper I

Syndicated - Outbound

thx for the  help so far. I was putting together an example to show, when all of a sudden, for no reason, when I say "New Measure", I see no DAX pane..

I'll keep working to fix this..

~sigh

lbendlin
Super User
Super User

Syndicated - Outbound

Apply the exact same filters to the card visual. then add  an appropriate column to the card visual and change it to "Count".

Syndicated - Outbound

hmm, no luck

I added the same filter on the card, and made the DAX on the measure t be:"

CountofRows = COUNT(MyCoolQuery[MyCaseID])"

, and the count card visual is just spinning..

There should be 50 rows out of a possible 9308 total rows available

😕

Not sure I completely understand why I'd apply a filter on the count card itself..

 

Appreciate the reply, nonetheless

 

 

Syndicated - Outbound

COUNT alone simply count the numeric rows in a column. Assuming MyCaseID is a numeric one, then that is the correct function to use otherwise use COUNTA. If you want the count to be filtered, use something like:

CALCULATE (
    COUNT ( MyCoolQuery[MyCaseID] ),
    MyCoolQuery[Column1] = "filter value",
    MyCoolQuery[Column2] = "filter value"
)

 

 

Not sure I completely understand why I'd apply a filter on the count card itself.. You can use visual filter. Drag a column to the filter pane and select a filter value. Otherwise, create a measure that returns a fitlered value.

 





Dane Belarmino | Microsoft MVP | Proud to be a Super User!

Did I answer your question? Mark my post as a solution!


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.

Syndicated - Outbound
Not sure I completely understand why I'd apply a filter on the count card itself..

If you want to arrive at the same number you need to use the exact same filter context.

 

 

Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).
Do not include sensitive information. Do not include anything that is unrelated to the issue or question.
Please show the expected outcome based on the sample data you provided.

Need help uploading data? https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-...
Want faster answers? https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447...

avatar user

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 Solution Authors (Last Month)
Top Kudoed Authors (Last Month)