Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code FABINSIDER for a $400 discount.
Register nowThe Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.
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!
Check out the February 2025 Power BI update to learn about new features.
User | Count |
---|---|
25 | |
12 | |
9 | |
9 | |
9 |
User | Count |
---|---|
19 | |
14 | |
14 | |
13 | |
12 |