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

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now

Reply
pbikate
Regular Visitor

Map visual query

Hi
I am using the map visual and want to know how many valid postcodes I have in my dataset that are successfully showing on the map visual.
For example; let’s say in my data I have 100 rows and in the postcode column I have;
80 unique correct/valid postcodes
10 entries as n/a
10 entries that are a mix of test, blank, no, xxxxx, testing etc
I want to know that 80% of my postcode data is successfully showing on the map visual.
Thank you for any help here.

1 ACCEPTED SOLUTION
123abc
Community Champion
Community Champion

I apologize for any confusion in my previous response. You are correct, setting an assumption or criteria for what Power BI considers "successfully displayed" based on specific filter conditions may not accurately reflect what Power BI has truly understood or successfully mapped.

Power BI doesn't have an inherent capability to automatically detect what it has successfully read or understood on a map visual. It relies on the data provided and the mappings created by the user. Therefore, it's not possible for Power BI to independently determine which postcodes it has successfully displayed without some form of user-defined criteria or assumptions.

If you want Power BI to automatically determine which postcodes it successfully displays on a map, it would require advanced natural language processing (NLP) or image recognition capabilities, which are not native to Power BI. Such capabilities would involve complex AI algorithms and machine learning models to interpret the visual elements on the map, which typically falls outside the scope of Power BI's capabilities.

To achieve what you're looking for, you might consider exploring custom AI solutions that are capable of interpreting visual elements on a map. These solutions would require integration with Power BI and potentially custom development work to provide the desired functionality.

 

Please sahre in detail your issue and also share your data file if possible

View solution in original post

5 REPLIES 5
pbikate
Regular Visitor

Thank you for your response here.
I have done something similar currently to give an indication of how many postcodes should be seen on the map visual.  I am interested to know if there is a more intuitive way of achieving this -- for pbi to essentially tell me how many postcodes it is able to read and present back in the map visual.

123abc
Community Champion
Community Champion

Power BI doesn't have a built-in feature to directly count how many unique values are being displayed on a map visual, especially if some of your postcodes are not being displayed due to invalid or missing data. However, you can still achieve this indirectly with some additional steps:

1. **Create a New Table for Displayed Postcodes:**
Create a new table in Power BI that contains only the unique postcodes that are successfully displayed on the map visual. You can use the `SUMMARIZE` or `VALUES` function to create this table. Let's call this table "DisplayedPostcodes."

```DAX
DisplayedPostcodes = VALUES('YourTable'[Postcode])
```

Replace 'YourTable' and '[Postcode]' with your actual table and column names.

2. **Create a Measure for Count of Displayed Postcodes:**
Create a DAX measure to count the number of postcodes in the "DisplayedPostcodes" table. This measure will give you the count of unique postcodes that are successfully displayed on the map.

```DAX
CountOfDisplayedPostcodes = COUNTROWS('DisplayedPostcodes')
```

3. **Display the Count in a Card Visual:**
Add the "CountOfDisplayedPostcodes" measure to your report as a card visual. This card visual will display the count of postcodes that are successfully displayed on the map.

With this approach, you'll have a clear indication of how many unique postcodes are being displayed on the map visual. Whenever you filter or adjust your map visual, the count in the card visual will automatically update to reflect the current displayed postcodes.

This method allows you to indirectly track the number of postcodes displayed on the map visual without having a built-in feature in Power BI to directly count them.

Thank you 

Just to clarify, in step 1 you have said 'Create a new table in Power BI that contains only the unique postcodes that are successfully displayed on the map visual.'

Am I correct in thinking I need to set the criteria/assumption of what PBI has read/understood and successfully mapped on the visual?

I had hoped there would be a way PBI can tell me what it has successfully read/understood instead on me setting the assumption of what I think should be readable (or matching back to ONS data on UK postcodes)

123abc
Community Champion
Community Champion

I apologize for any confusion in my previous response. You are correct, setting an assumption or criteria for what Power BI considers "successfully displayed" based on specific filter conditions may not accurately reflect what Power BI has truly understood or successfully mapped.

Power BI doesn't have an inherent capability to automatically detect what it has successfully read or understood on a map visual. It relies on the data provided and the mappings created by the user. Therefore, it's not possible for Power BI to independently determine which postcodes it has successfully displayed without some form of user-defined criteria or assumptions.

If you want Power BI to automatically determine which postcodes it successfully displays on a map, it would require advanced natural language processing (NLP) or image recognition capabilities, which are not native to Power BI. Such capabilities would involve complex AI algorithms and machine learning models to interpret the visual elements on the map, which typically falls outside the scope of Power BI's capabilities.

To achieve what you're looking for, you might consider exploring custom AI solutions that are capable of interpreting visual elements on a map. These solutions would require integration with Power BI and potentially custom development work to provide the desired functionality.

 

Please sahre in detail your issue and also share your data file if possible

123abc
Community Champion
Community Champion

To determine the percentage of valid postcodes that are successfully showing on a map visual in Power BI, you can follow these steps:

  1. Data Preparation: Ensure that you have a column in your dataset that contains valid postcodes. You may need to clean or filter your data to separate the valid postcodes from invalid entries.

  2. Create a Measure for Valid Postcodes: Create a DAX measure that counts the number of rows with valid postcodes. You can use the COUNTROWS and FILTER functions to do this. Assuming your valid postcodes are in a column called "Postcode," your measure might look like this:

 

ValidPostcodesCount = COUNTROWS(FILTER(YourTable, YourTable[Postcode] <> "n/a" && YourTable[Postcode] <> "test" && YourTable[Postcode] <> "" && YourTable[Postcode] <> "xxxxx" && YourTable[Postcode] <> "testing"))

 

 

  1. This measure counts rows where the "Postcode" column is not "n/a," "test," empty, "xxxxx," or "testing."

  2. Create a Measure for Total Rows: Create a measure that counts the total number of rows in your dataset:

TotalRowCount = COUNTROWS(YourTable)

 

Calculate the Percentage: Finally, create a measure to calculate the percentage of valid postcodes that are successfully showing on the map:

 

ValidPostcodesPercentage = DIVIDE([ValidPostcodesCount], [TotalRowCount], 0)

 

  1. This measure divides the count of valid postcodes by the total row count to get the percentage. The DIVIDE function is used to handle cases where the denominator (total row count) is zero to avoid errors.

Now, you can add the "ValidPostcodesPercentage" measure to your map visual or any other visual in Power BI to see the percentage of valid postcodes that are successfully displayed on the map.

Make sure to replace "YourTable" and "Postcode" with the actual table and column names from your dataset. Additionally, you can customize the filter conditions in the "ValidPostcodesCount" measure to match the specific criteria for valid postcodes in your data.

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.