cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
megferguson Frequent Visitor
Frequent Visitor

Filterable Count with Label

Hello,

 

I'm trying to create a shape map visual based on a 3 digit zip. The 3 digit zip is a created column based on the full zip code, so each 3 digit zip can repeat many times throughout the data. I've mocked up a sample dataset below with the key fields. There are more fields in the actual dataset that act as filters on the page as well.

 

ShippingPostalShippingPostal_SubstringId
123331233wer
123451231111
12346123111a
123471232345
12361123q234
12399123d43a
15533155342a
156441564rfd
15678156678s
19811134a321
19834198df34
19845198f4er
198561245432
198701981234
13423134u890



I need to group by each ShippingPostal_Substring and take a count of Id (or rowcount based on ShippingPostal_Substring). 

 

ShippingPostal_SubstringCountOfId
1236
1562
1985
1551
1341


Once I have the count I need to create a label based on the count value (<2, 2-5, >=5). 

 

ShippingPostal_SubstringCountOfIdLabel
1236>=5
15622-5
1985>=5
1551<2
1341<2

 

The problem that I'm running into is I need the label to be a column because it is acting as the legend in my map. I can get this all to work using measures, but that doesn't help me with the visual.

 

I have tried using the Group By functionality in the query editor, but this gives a static count value and I need the count to update based on the filters applied on the page. The label likewise must update as filters are applied. If the count value started at 6 with no filters applied and the filters dropped the count down to 3, I need the map to display the filtered count of 3 with a label of "2-5", not 6 with a label of ">=5". 

 

I have tried to create a calculated column for the count and put it into a table visual, let's call it [Count123]. If the field is left as "Don't Summarize", [Count123] shows as 1 for every PostalShipping_Substring; if the field is set to "Sum", the count displays correctly. Example of what I see from the table visual is below:

 

ShippingPostal_Substring

Count123

(Don't Summarize)

Count123

(Sum)

19815
Total 5

 

I have not been able to create a column that correctly counts the Id's that can then have a label correctly applied to it. The fact that the label has to be a column to work in the map visual is what is tripping me up.

 

Any suggestions of how to create a dynamic count with a column label that updates based on filters and slicers on the page would be very much appreciated. 

1 REPLY 1
PR20048119 New Contributor
New Contributor

Re: Filterable Count with Label

Column values are loaded at first load only they can't be changed based on applied filters.

For dynamic calculations you need to use measures only.


Thanks
Pravin


If it resolves your problem mark it as a solution and give Kudos.

Helpful resources

Announcements
Exclusive LIVE Community Event #3 – Ask Arun Anything

Exclusive LIVE Community Event #3 – Ask Arun Anything

Join us in the third Triple A event!

Meet the 2020 Season 1 Power BI Super Users!

Meet the 2020 Season 1 Power BI Super Users!

It’s the start of a new Super User season! Learn all about the new Super Users and brand-new tiered recognition system.

January 2020 Community Highlights

January 2020 Community Highlights

Make sure you didn't miss any of the things that happened in the community in January!

Top Solution Authors
Top Kudoed Authors