Don't miss your chance to take the Fabric Data Engineer (DP-600) exam for FREE! Find out how by watching the DP-600 session on-demand now through April 28th.
Learn moreJoin the FabCon + SQLCon recap series. Up next: Power BI, Real-Time Intelligence, IQ and AI, and Data Factory take center stage. All sessions are available on-demand after the live show. Register now
Hi Everyone,
Hope you are doing good.
I have 2 sample datasets as below:
I have created a measure named
I want this measure to show the total value as 2968, not 1491 (perhaps showing the remaining amounts as blank). Can you help me with this?
(This is a sample dataset i created, in my original dataset i need to achieve the same thing without creating relationship)
Group
Solved! Go to Solution.
I think the below should work. It will give the value for the current group if the group is in scope, otherwise it will give the total
Amt Total Treatas =
VAR AllAmtNames =
DISTINCT ( Amt[Cust] )
VAR AllGroupNames =
DISTINCT ( ALL ( Group[Cust] ) )
VAR MissingAmtNames =
EXCEPT ( AllAmtNames, AllGroupNames )
VAR Result =
IF (
ISINSCOPE ( Group[Cust] ),
CALCULATE ( SUM ( Amt[Amount] ), TREATAS ( VALUES ( Group[Cust] ), Amt[Cust] ) ),
CALCULATE (
SUM ( Amt[Amount] ),
TREATAS ( UNION ( VALUES ( Group[Cust] ), MissingAmtNames ), Amt[Cust] )
)
)
RETURN
Result
I think the below should work. It will give the value for the current group if the group is in scope, otherwise it will give the total
Amt Total Treatas =
VAR AllAmtNames =
DISTINCT ( Amt[Cust] )
VAR AllGroupNames =
DISTINCT ( ALL ( Group[Cust] ) )
VAR MissingAmtNames =
EXCEPT ( AllAmtNames, AllGroupNames )
VAR Result =
IF (
ISINSCOPE ( Group[Cust] ),
CALCULATE ( SUM ( Amt[Amount] ), TREATAS ( VALUES ( Group[Cust] ), Amt[Cust] ) ),
CALCULATE (
SUM ( Amt[Amount] ),
TREATAS ( UNION ( VALUES ( Group[Cust] ), MissingAmtNames ), Amt[Cust] )
)
)
RETURN
Result
You can try
Amt_Total_Treatas =
CALCULATE (
SUM ( Amt[Amt] ),
TREATAS ( UNION ( VALUES ( 'Group'[Cust] ), { BLANK () } ), Amt[Cust] )
)
Hi John,
Thanks for the comment, 🙂
However i am getting the same result for this as my previous measure, check below:
Check out the April 2026 Power BI update to learn about new features.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
| User | Count |
|---|---|
| 43 | |
| 35 | |
| 35 | |
| 21 | |
| 15 |
| User | Count |
|---|---|
| 63 | |
| 58 | |
| 28 | |
| 27 | |
| 25 |