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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
Anonymous
Not applicable

Chart not counting values correctly

I have an Power BI dataset with a column in which there are three possible values: Internal, External, None. I am trying to create a pie chart that counts the number of rows with each value, but my pie chart only counts the Internal and External values. Is there a reason it does not count 'None'? How do I get the desired pie chart?

1 ACCEPTED SOLUTION

@Anonymous ,

 

You don't need to import using this way, you can refer directly to the one drive.

 

https://docs.microsoft.com/en-us/power-bi/connect-data/desktop-use-onedrive-business-links



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

Proud to be a Super User!



View solution in original post

22 REPLIES 22
camargos88
Community Champion
Community Champion

Hi @Anonymous ,

 

Some data/model as example would help your case. Please, provide it if possible.



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

Proud to be a Super User!



Anonymous
Not applicable

I can't link the dataset itself as it contains sensitive information, but it is essentially a table and the column I'm working with looks like this, with more additional rows.

lauka_1-1602631801560.png

 

I want the pie chart to show the amount of internal, external, and none but when I use the column for my pie chart, it only shows this. What I'm confused about it why it doesn't show anything for 'None'.

lauka_2-1602631932670.png

@Anonymous ,

 

Have you checked you if have any filter (visual / page / report) or even on Power Query ?



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

Proud to be a Super User!



Anonymous
Not applicable

I don't have any filters turned on. Does Power BI perhaps consider 'None' as a blank value? I couldn't find any documentation regarding this possibility, but if it does, then would there be a way to check that, or include it in the pie chart through a workaround?

I got the same values and the result is:

 

Capture.PNG

 

 

Blank values would show like a empty value.

 

Are you using any measure for it ? If yes, can you show the code ?

 

 



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

Proud to be a Super User!



Anonymous
Not applicable

I am not using any measures, I just used the built in pie chart fields. Since there doesn't seem to be an issue with the word None, does that mean there is an issue with the raw data itself? I don't know what else I should troubleshoot

@Anonymous ,

 

If you go to the Data View, on PBI Desktop...can you filter the values with None ?



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

Proud to be a Super User!



Anonymous
Not applicable

I don't have a data view in Power BI, I guess because I am using a Power BI dataset? I can only see the model view.

@Anonymous ,

 

Maybe this dataset is filtered, can you check the original file from this dataset ?



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

Proud to be a Super User!



Anonymous
Not applicable

The original dataset is not filtered

@Anonymous ,

 

Try this column with other visual, like bar or table...

 

Also, are you not using any slicer on the page ?



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

Proud to be a Super User!



Anonymous
Not applicable

The bar chart and table are both the same. I am not using any slicers either. I did notice something though, when I was checking the filters. In the real dataset there are 35 'None' values, and I found them here.

lauka_0-1602634608202.png

So the values are there, but just not showing I guess? Any ideas as to why it is treating them like blank values?

@Anonymous ,

 

Is it possible someone replace the values None -> null ?



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

Proud to be a Super User!



Anonymous
Not applicable

I am looking at the original data and there's no null

@Anonymous ,

 

Check the PBIX that created this dataset, maybe there is a step on Power Query replacing the values. 



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

Proud to be a Super User!



Anonymous
Not applicable

I'm not sure if it makes any difference, but this dataset is created from an Excel file. The excel file is on my organizational OneDrive, which I imported to Power BI using this option.

lauka_0-1602635514199.png

From there, I created a new .pbix file and used "Power BI datasets" as my data

@Anonymous ,

 

As far as I know it shoudn't make any difference...

I simulated an Excel file from my side as well and it imported this column as text.

 

Capture.PNG

 

Honestly I have no idea why it has changed to null values.

It's difficult to say about any transformation because you have sensitive info there.

However you can create a new column like, it's not the best solution for it, but here it goes:

Type2 = IF('Table'[Type] = BLANK(), "None", 'Table'[Type])
 
Is it possible to share an example of this excel, masking/deleting the sensitive info ?

 



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

Proud to be a Super User!



Anonymous
Not applicable

Unfortunately, in using Power BI dataset, I can't add another column, since I can't even get to a table view or open power query editor.

@Anonymous ,

 

You don't need to import using this way, you can refer directly to the one drive.

 

https://docs.microsoft.com/en-us/power-bi/connect-data/desktop-use-onedrive-business-links



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

Proud to be a Super User!



Anonymous
Not applicable

I just tried this and it worked! My pie chart finally has the 'None' count. Thank you so much for helping me with this issue, even though it turned out to be very different than I originally thought.

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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