March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
Hi I have a table like below to show logistics for the Shipment Order where same Shipment order and same quantity gets shipped using multiple transport types.
Shipment_Order | Customer | Transport | Quantity
SO123 | Smith | Boat | 110
SO123 | Smith | Plane | 110
SO123 | Smith | Car | 110
In power BI, I use Matrix with the group rows (levels) and Sum(Quantity) as measure:
Transport
Customer
Shipment_Order
It all works until users start using [go to the next level in the hierarchy] drill down (two downside arrows on top right corner of the matrix).
As it drill downs to the next level and ignores all parent groupings(Transport).
For example, if drilled down to Shipment_Order level the Sum(Quantity) will double dip on the same:
shipment:
Shipment_Order | Quantity
SO123 | 330 (110+110+110) - but should be 110
It is not possible to disable this drill down feature. How Quantity measure could be tweaked not to double dip on the same Shipment_Order? Or may be this could be set in Matrix somehow? please advise.
Thank you!
Solved! Go to Solution.
@Julia1234 I have made changes to the rate of views please
measure = IF( ISINSCOPE('table'[Transport]), SUM('table'[Quantity]), AVERAGE('table'[Quantity]))
Thank you @DimaMD , your solution worked better than the one I suggested above.
I tweaked it a bit and used HASONEVALUE instead of ISINSCOPE, tested and it worked with real life numbers:
_Quantity =
VAR Qty = SUMX(values('Table'[Shipment_Order]),calculate(MAX('Table'[Quantity])))
RETURN IF(
HASONEVALUE( 'Table'[Transport]),
SUM('Table'[Quantity]),
Qty
)
Thank you for your help.
Hi @Julia1234 try it
measure =
IF( ISINSCOPE('table'[Transport]), SUM('table'[Quantity]), AVERAGE('table'[Quantity]))
Thank you for the prompt response @DimaMD
I tested the solution but it still resulted in double summing unfortunately.
I also tried this formula
_measure = SUMX(values('table'[Shipment_Order]),calculate(MAX('table'[Quantity]))) and it so far it calculates correctly, will do more testing.
Again , many thanks!
@Julia1234 I have made changes to the rate of views please
measure = IF( ISINSCOPE('table'[Transport]), SUM('table'[Quantity]), AVERAGE('table'[Quantity]))
Thank you @DimaMD , your solution worked better than the one I suggested above.
I tweaked it a bit and used HASONEVALUE instead of ISINSCOPE, tested and it worked with real life numbers:
_Quantity =
VAR Qty = SUMX(values('Table'[Shipment_Order]),calculate(MAX('Table'[Quantity])))
RETURN IF(
HASONEVALUE( 'Table'[Transport]),
SUM('Table'[Quantity]),
Qty
)
Thank you for your help.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
23 | |
16 | |
12 | |
9 | |
7 |
User | Count |
---|---|
38 | |
32 | |
24 | |
12 | |
11 |