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

Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.

Reply
Anonymous
Not applicable

Getting aggregation value in matrix data mapping

Hi all ! 

By using the matrix data mapping with the capabilities as below : 

 

 

 

    "dataRoles": [
                {
            "name": "timedimension",
            "displayName": "Time Dimension",
            "displayNameKey": "Visual_Category",
            "kind": "Grouping"
        },
        {
            "name": "dimension",
            "displayName": "Dimension",
            "displayNameKey": "Visual_Dimension",
            "kind": "Grouping"
        },
        {
            "name": "measure",
            "displayName": "Measure",
            "displayNameKey": "Visual_Values",
            "kind": "Measure"
        }
    ],
    ...
    "dataViewMappings": [
        {
            "matrix": {
                "rows": {
                    "for": {
                        "in": "timedimension"
                    },
                    "root": {
                        "children": [
                            {
                                "level": 0,
                                "value": "Year",
                                "children": [
                                    {
                                        "level": 1,
                                        "value": "Quarter",
                                        "children": [
                                            {
                                                "level": 2,
                                                "value": "Month",
                                                "children": [
                                                    {
                                                        "level": 3,
                                                        "value": "Day",
                                                        "values": {
                                                            "0": {
                                                                "value": "measure"
                                                            }
                                                        }
                                                    }
                                                ]
                                            }
                                        ]
                                    }
                                ]
                            }
                        ]
                    }
                },
                "columns": {
                    "root": {
                        "children": [
                            {
                                "level": 0,
                                "value": "dimension"
                            }
                        ]
                    }
                },
                "values": {
                    "select": [
                        {
                            "bind": {
                                "to": "measure"
                            }
                        }
                    ]
                }
            }
        }
    ]

 

 

 

I am getting the values just for the leaves of my hierarchy as below : 

turgayseop_0-1618421879125.png

But, I need to get the aggregation values for the parent members of the hierarchy (Month/Quarter/Year) .

 

Any comments & helps to figure it out is welcome  !

 

Thanks in advance ! 

3 REPLIES 3
Anonymous
Not applicable

Hi @dm-p ! about this maybe you could catch a mistake or have an opinion ? You can find some more details at the post that i have replied here in same topic.. Thanks in Advance ‌‌!

Anonymous
Not applicable

Hi @V-lianl-msft  thanks for answering !

 

Well , the configuration i have shared is already done guiding by the documentation that you have shared.

 

I will make some highlights of the changes that I applied upon the reference to point out better the situation,

 

So in the documentation the last child of the "row" attribute which include the value properties:

 

 

"children": [
		{
			"level": 2,
			...
			"value": "Grandchild1",
			"identity": {...},
			"values": {
				"0": {
					"value": 5 // value for Col1
				},
				"1": {
					"value": 6 // value for Col2
				}
			}
		},

 

 

So , here the values (5,6) are placed in our case will be obtained from the "measure" data type, so it is mapped as : 

 

 

"children": [
		{
			"level": 3,
			"value": "Day",
			"values": {
				"0": {
					"value": "measure"
				}
			}
		}
	]

 

 

and for the "columns" the "value" is changed as "dimension" in my configuration to get the value for each column name from "dimension" data type ,

documentation : 

 

 

"columns": {
            "levels": [...],
            "root": {
                ...
                "children": [
                    {
                        "level": 0,
                        "levelValues": [...],
                        "value": "Col1",
                        "identity": {...}
                    },

 

 

 

my configuration : 

 

 

"columns": {
                "for": {
                   "in": "dimension"
                },
		"root": {
			"children": [
				{
					"level": 0,
					"value": "dimension"
				}
			]
		}
	},

 

 

 

Here one last difference is that I have placed the for:in  attribute (it is mandatory).

 

So, depending on this, if you have any specific suggestion please do not hesitate to share.. 

I will be looking forward for any answer, thanks in advance! 

V-lianl-msft
Community Support
Community Support

Hi @Anonymous ,

 

Please refer to the document:

https://docs.microsoft.com/en-us/power-bi/developer/visuals/dataview-mappings 

 

Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

Helpful resources

Announcements
October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.