The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
No he podido colocar la suma total por columna utilizando RANKX, cuando tengo las tiendas como columnas,
La ultima imagen, tengo marcada la columna total en color rojo, la cual es afectada por la funcion RANKX.
¡Lo correcto seria que la columna de total este sumando!
Ranking USD:=var Items = SELECTCOLUMNS(ALL(dimClas_Otros), "RankItem", dimClas_Otros[Clasificacion 1])
var ItemsWithValue = ADDCOLUMNS(Items, "RankMeasure", CALCULATE([Total USD], all(dimClas)))
var ItemsWithRank = ADDCOLUMNS(ItemsWithValue, "Rank", RANKX(ItemsWithValue,[Total USD],, DESC, dense))
var ItemsWithTop = ADDCOLUMNS(ItemsWithRank, "TopOrOthers", IF([Rank] <= 2, [RankItem], "Otros"))
var ItemsFinal = SELECTCOLUMNS(
FILTER(
ItemsWithTop,
CONTAINSROW(VALUES(dimClas_Otros[Clasificacion 1]), [TopOrOthers]) &&
CONTAINSROW(VALUES(dimClas[Clasificacion 1]), [RankItem])),
"TopN_Others", [RankItem])
return
SUMX(ItemsFinal, [Total USD])
gracias por su tiempo,!
adjunto las imagenes de los datos.
Hi @Edy_Martinez ,
As @lbendlin said, we need more detailed data and expected results.
What field do you add for the values in your matrix? What kind of results do you want your totals to display?
We often use the ISINSCOPE function to represent different total results.
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.
Please provide sanitized sample data that fully covers your issue. Paste the data into a table in your post or use one of the file services. Please show the expected outcome.
User | Count |
---|---|
28 | |
12 | |
8 | |
7 | |
5 |
User | Count |
---|---|
34 | |
15 | |
12 | |
7 | |
6 |