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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
soandos
Helper I
Helper I

Enabling "Don't summarize" for a visual

I am building a visual (think XY scatter, with some other features) that needs to be able to look at the individual data points. I set up the data roles/view mappings as follows:

 

"dataRoles": [
        {
            "displayName""Category Data",
            "name""category",
            "kind""Grouping"
        },
        {
            "displayName""Measure Data",
            "name""measure",
            "kind""Measure"
        },
        {
            "displayName""My Tooltips",
            "name""Tooltips",
            "kind""Measure"
        }
    ],
    "dataViewMappings": [
        {
            "table": {
                "rows": {
                    "select": [
                        {
                            "for": {
                                "in""column"
                            }
                        },
                        {
                            "for": {
                                "in""value"
                            }
                        }
                    ]
                }
            }
        }
    ]
 
When I look at the visual in the service, it still does not show me the option to turn off summerization for the measure.
 
How can I fix this?
1 REPLY 1
dm-p
Super User
Super User

Hi @soandos,

Do not summarize will only be presented for implicit measures and not for explicit measures, and if you set the data role's kind to GroupingOrMeasure rather than Measure. If you're unsure of the difference between implicit and explicit, this post should catch you up.

One other thing I've noticed in your example is that you have a dataRole named measure, but you aren't referencing it in your dataViewMapping, so it may not be representing your data correctly also. Based on your dataRoles, the following section of your dataViewMapping....

 

 

...
    {
      "for": {
        "in": "value"
      }
    }
...

 

 

Should be modified to:

 

 

...
    {
      "for": {
        "in": "measure"
      }
    }
...

 

 

 

Note that if you're looking to distribute your visual to a wider audience, you can't typically force users along a path of using implicit measures for your visual, as they may want to use explicit measures, particularly given the flexibility they offer.

With this approach you also have to consider that Do not summarize only presents unique values for your measure (like a standard dimension attribute might), so if you had multiple occurrences of the same value then these get "lost" in your data view mapping and your visual will typically not show every measure; just the unique values. I've written a little bit about this here, and may help illustrate what I'm getting at.

In these cases you would ideally introduce another dataRole to ensure a lower-level of detail. Note that the core scatter plot has one of these for this very reason:

 

dm-p_0-1610996246861.png

If you're using the category data role for this purpose then you should be fine, but if not, you could modify your capabilities to introduce another dataRole to ensure this level of detail, and add it to the dataViewMapping to ensure it gets queried and mapped.

Hopefully this all makes sense. Good luck!

Daniel





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

Proud to be a Super User!


My course: Introduction to Developing Power BI Visuals


On how to ask a technical question, if you really want an answer (courtesy of SQLBI)




Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

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.