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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
lawada
Helper III
Helper III

getting one extra blank row in the data when using count

i have a table that shows : laundry name, order id, and rating id . for one laundry I'm getting one extra blank row for the rating , for example:
one laundry has total orders =6 and total ratings =1 but i=in power bi its counting it as 6 orders and 2 ratings with one extra blank row for the rating

lawada_0-1642332077111.pnglawada_1-1642332099224.png

note that when i run the query in my database i get the count of rating as 1 but in power bi only ot's  adding one extra row

1 ACCEPTED SOLUTION

9 REPLIES 9
kate_kk
Regular Visitor

May I know any findings for this problem?
Case 1:
I have the same issue, checked there are only 41 rows in data, but after adding a relationship, 
there is an extra row shown in Count() function,
It also shows a blank option in the filter pane with no record.

Case 2: 
After applying and loading data in power query to power bi report, 

both the report and data view show an extra blank record.

but there is no record found in the data source and power query editor (filtered with null, result = 0)
and no relationship was applied in the report.
Checked another report with the same data source but no extra blank row problem.

aj1973
Community Champion
Community Champion

Hi @lawada 

You can go to the filter panel and deselect the blank for that rating_id field

aj1973_0-1642342006149.png

 

Regards
Amine Jerbi

If I answered your question, please mark this thread as accepted
and you can follow me on
My Website, LinkedIn and Facebook

that's not possible if i want to count values, it will count the blank row however theres no blank value in the data

bcdobbs
Super User
Super User

Hi,

A few questions...

1) Have you written a measure to do the count or are just dropping the column into the visual ? If it's a measure can you share? If you're dropping column into visual I'm assuming you've checked what aggregation it is set to use? (Will normally default to Sum rather than count).

 

2) Is it possible a row looks blank but actually has something like a space in it?

 

3) Is it all just a single table or do you have relationships involved? If you do can you share a picture of your data model or even better the pbix file (or demo version of it)

 

Ben

 



Ben Dobbs

LinkedIn | Twitter | Blog

Did I answer your question? Mark my post as a solution! This will help others on the forum!
Appreciate your Kudos!!

1)its just measure with count function

2) i checked in the database and there's one value

3)theres no relationship with other tables and .

Do you want to strip any sensitive data out and send your pbix file. Nothing in your answers is jumping out as the cause! Will happily take a look.



Ben Dobbs

LinkedIn | Twitter | Blog

Did I answer your question? Mark my post as a solution! This will help others on the forum!
Appreciate your Kudos!!

The other thing to try is when you import in power query run Clean and then Trim on the column in question. Fairly sure there might be some hidden blank space. Worth ruling it out anyway.



Ben Dobbs

LinkedIn | Twitter | Blog

Did I answer your question? Mark my post as a solution! This will help others on the forum!
Appreciate your Kudos!!

using count instead of distinct count worked for me . distinct count considers the blank row however count doeant. will try to find out if theres any blank data also

FYI, there's also a function DISTINCTCOUNTNOBLANK.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

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.