Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
Hi,
I try this Measure
Solved! Go to Solution.
@_Loic Let's try a different approach:
_Cumul_III =
VAR CurrentProduct = SELECTEDVALUE(Produits[PRO_CODE])
VAR Mon_Numero = RANKX(ALLSELECTED(Produits[PRO_CODE]), [_Marges_2], , DESC, Dense)
VAR My_Sum =
CALCULATE(
SUM([_Marges_2]),
FILTER(
ALL(Produits[PRO_CODE]),
RANKX(ALLSELECTED(Produits[PRO_CODE]), [_Marges_2], , DESC, Dense) <= Mon_Numero &&
SELECTEDVALUE(Produits[PRO_CODE]) = CurrentProduct
)
)
RETURN My_Sum
BBF
Hello BBF,
Really great !
it works perfectly !!
Thanks .
@_Loic Hi!
Try with:
_Cumul_III =
VAR Mon_Numero = RANKX(ALLSELECTED(Produits[PRO_CODE]), [_Marges_2], , DESC, Dense)
VAR SelectedProducts = TOPN(Mon_Numero, VALUES(Produits[PRO_CODE]), [_Marges_2], DESC)
VAR My_Sum = CALCULATE(SUM([_Marges_2]), FILTER(ALL(Produits[PRO_CODE]), RANKX(ALLSELECTED(Produits[PRO_CODE]), [_Marges_2], , DESC, Dense) <= Mon_Numero))
RETURN My_Sum
BBF
Thanks a lot,
Your code is interesting, better than me.
But i have the same result ...
@_Loic Let's try a different approach:
_Cumul_III =
VAR CurrentProduct = SELECTEDVALUE(Produits[PRO_CODE])
VAR Mon_Numero = RANKX(ALLSELECTED(Produits[PRO_CODE]), [_Marges_2], , DESC, Dense)
VAR My_Sum =
CALCULATE(
SUM([_Marges_2]),
FILTER(
ALL(Produits[PRO_CODE]),
RANKX(ALLSELECTED(Produits[PRO_CODE]), [_Marges_2], , DESC, Dense) <= Mon_Numero &&
SELECTEDVALUE(Produits[PRO_CODE]) = CurrentProduct
)
)
RETURN My_Sum
BBF
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
21 | |
15 | |
14 | |
11 | |
7 |
User | Count |
---|---|
26 | |
24 | |
12 | |
11 | |
10 |