Forum Discussion
Formula dax
- 2 years ago
Hi @tiagolangerdof,
You just made a Mix when you copy the measure
Change this with ==>
Min( 'Ordem de compra'[indice] ),
I made this hope that will help you.
MEASURE =
VAR ValidIndex =
SELECTEDVALUE ( Cust_Orders[Indice] )
VAR Salescumul =
CALCULATE (
SUM ( Cust_Orders[Qte] ),
Cust_Orders[Indice] <= ValidIndex,
ALL ( Cust_Orders ),
ALLEXCEPT ( Cust_Orders, Cust_Orders[Item] )
)
VAR ValuePreviousSalesCumul =
CALCULATE (
SUM ( Cust_Orders[Qte] ),
Cust_Orders[Indice] <= ValidIndex - 1,
ALL ( Cust_Orders ),
ALLEXCEPT ( Cust_Orders, Cust_Orders[Item] )
)
VAR Dernierindexcumulachat =
CALCULATE (
MIN ( Achats[Indice] ),
Salescumul <= Achats[CUmul],
REMOVEFILTERS ()
)
VAR Premierindexcumulachat =
CALCULATE (
MIN ( Achats[Indice] ),
ValuePreviousSalesCumul <= Achats[CUmul],
REMOVEFILTERS ()
)
VAR div =
CALCULATE (
MIN ( Achats[Indice] ),
ValuePreviousSalesCumul <= Achats[CUmul],
REMOVEFILTERS ()
)
VAR result =
CALCULATE (
CONCATENATEX (
FILTER (
Achats,
Achats[Indice] IN { Premierindexcumulachat, Dernierindexcumulachat }
),
Achats[PO],
", "
),
REMOVEFILTERS ()
)
RETURN
result
Cumul is a calculated clumn in the Table Achats (Purchase Orders)
Hello I couldn't do it as you did, is there any other formula that you didn't show?
- tiagolangendorf2 years agoRegular Visitor
My result was not the same, can anyone help me? in our friend JamesFR06's formula it seems that the accumulated works in my formula it doesn't. Here is a link to my archive
- JamesFR062 years agoResolver IV
Hi @tiagolangerdof,
You just made a Mix when you copy the measure
Change this with ==>
Min( 'Ordem de compra'[indice] ),
- tiagolangendorf2 years agoRegular Visitor
Thank you very much!! You helped me a lot!!!!