Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
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 :
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 !
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 !
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!
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.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
11 | |
6 | |
4 | |
2 | |
2 |
User | Count |
---|---|
4 | |
3 | |
3 | |
3 | |
3 |