The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
Hi All,
I have a running total percentage messure [Pareto] based on an inventory table
I want to return the largest value from the [Inventory Value] messure from the ItemID > 0.50 for messure [Pareto]
Example:
BranchID | ItemID | Inventory Value | PI Pareto | Inventory Rank1 |
DB01 | 500083704 | 6361.2 | 0.391 | 1 |
DB01 | 500056144 | 5000 | 0.699 | 2 |
DB01 | 500078377 | 4883.904 | 1 | 3 |
Th expected output would be 5000, the [Inventory Value] that is largest and over 0.50 [Pareto]
[Inventory Sample]
BranchID | ItemID | LotNumber | Quantity | MAC | Total MAC |
AT01 | 500051583 | P8Z0B | 29 | 4 | = Quantity x MAC |
AT01 | 500051583 | P8Z0B | 7138 | 4 | |
AT01 | 500051586 | 8CHHB | 7200 | 6 | |
AT01 | 500051586 | BX4FB | 5 | 6 | |
AT01 | 500051586 | B1DFB | 2300 | 6 | |
AT01 | 500051586 | 026FB | 258 | 6 | |
CL01 | 500051580 | K9PHB | 100 | 1 | |
CL01 | 500051580 | K9PHB | 200 | 1 | |
CL20 | 500051588 | YL2FB | 350 | 8 |
Pareto =
var InventoryValue = [Inventory Value]
var ALLIV = CALCULATE([Inventory Value], ALLSELECTED(Inventory) )
return
DIVIDE(
SUMX(
FILTER(
SUMMARIZE(ALLSELECTED(Inventory), Inventory[ItemID],
"Dollars", [Inventory Value]),
[Dollars] >= InventoryValue ),
[Dollars]),
ALLIV)
Inventory Value =
SUM(Inventory[Total MAC])
Hi @EnrichedUser ,
What is the relationship between your example and [Inventory Sample]? The two tables seem to be different.
If I understand correctly, you want to create a measure named 'Pareto'. How do you get the percentage of your Pareto measure? Is Inventory Value divided by the sum of all Inventory Values?
Best Regards,
Stephen Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi, @EnrichedUser
Please correct me if I wrongly understand your point.
In order to find higher than 50% Pareto && highest quantity ->
Please check the below picture if it is what you needed.
Outcome =
VAR newtable =
FILTER (
SUMMARIZE (
ALLSELECTED ( Inventory ),
Inventory[ItemID],
Inventory[Quantity],
"@pareto", [Pareto]
),
[@pareto] >= 0.5
)
RETURN
MAXX ( newtable, Inventory[Quantity] )
Did I answer your question? Mark my post as a solution!
Appreciate your Kudos!!