cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Helper II
Helper II

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

@lauka ,

 

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
Super User III
Super User III

Hi @lauka ,

 

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!



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

@lauka ,

 

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!



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!



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

@lauka ,

 

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!



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.

@lauka ,

 

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!



The original dataset is not filtered

@lauka ,

 

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!



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?

@lauka ,

 

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!



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

@lauka ,

 

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!



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

@lauka ,

 

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!



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.

@lauka ,

 

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

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
secondImage

Congratulations!

We are excited to announce the Power BI Super Users!

Wave Release 2

Check out the updates in Power BI.

Overview of Power BI 2020 release wave 2!

Microsoft Ignite

Microsoft Ignite

Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!

secondImage

The largest Power BI virtual conference

100+ sessions, 100+ speakers, Product managers, MVPs, and experts. All about Power BI. Attend online or watch the recordings.

Top Solution Authors
Top Kudoed Authors