Starting December 3, join live sessions with database experts and the Microsoft product team to learn just how easy it is to get started
Learn moreShape the future of the Fabric Community! Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions. Take survey.
Hi, I'd appreciaet your advice
I have 3 SharePoint lists (parent-chil) I pulled them into PBI like a table and created relationship in data model
the $$ amounts are related to parent not the child, so basically users enter their total domain cost and then provide some domain breakdown, but when I create a matrix and a measure of sum, the measure gets duplicated for every single sub domain.
how can I prevent that?
Solved! Go to Solution.
Hi, @Anonymous ;
You could create a measure as follow:
amount =
var _res=IF (
MAX ( 'Sub-Domain'[Sub-Domain] )
= CALCULATE (
MIN ( 'Sub-Domain'[Sub-Domain] ),
FILTER (
ALL ( 'Sub-Domain' ),
[Parent:Main Table ID] = MAX ( 'Main_Table'[Main Table ID] )
)
),
CALCULATE (
SUM ( 'Sub-Domain'[Amount $] ),
FILTER (
ALL ( 'Sub-Domain' ),
[Parent:Main Table ID] = MAX ( 'Main_Table'[Main Table ID] )
)
)
)
return IF(ISINSCOPE('Main_Table'[Main Table ID]),_res,SUM('Sub-Domain'[Amount $]
))
The final show:
Best Regards,
Community Support Team _ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi, @Anonymous ;
You could create a measure as follow:
amount =
var _res=IF (
MAX ( 'Sub-Domain'[Sub-Domain] )
= CALCULATE (
MIN ( 'Sub-Domain'[Sub-Domain] ),
FILTER (
ALL ( 'Sub-Domain' ),
[Parent:Main Table ID] = MAX ( 'Main_Table'[Main Table ID] )
)
),
CALCULATE (
SUM ( 'Sub-Domain'[Amount $] ),
FILTER (
ALL ( 'Sub-Domain' ),
[Parent:Main Table ID] = MAX ( 'Main_Table'[Main Table ID] )
)
)
)
return IF(ISINSCOPE('Main_Table'[Main Table ID]),_res,SUM('Sub-Domain'[Amount $]
))
The final show:
Best Regards,
Community Support Team _ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Don't rely on the implicit measures. Write a custom measure that handles the computations according to your requirements.
User | Count |
---|---|
25 | |
21 | |
20 | |
13 | |
12 |
User | Count |
---|---|
40 | |
28 | |
28 | |
22 | |
21 |