Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more.
Get startedGrow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.
Estimado todo, tengo un dato como abajo y me gustaría calcular los rangos basados en RNO_Condition.
Datos:-
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("Tc07CoUwEEDRrTymlpCZ/LC0faAWlhKCYEBBYooUunsTVLC9p7jjCCiMNC74HSoQSJwpAlu9vU9L7sgFVwzFB4a4hmkrVhtG6haJWrluT792itHPRUkzTR9twrH6dGYiw58uEd0/lX++SLD2Ag==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type text) meta [Serialized.Text = true]) in type table [RNO_Condition = _t, Amt = _t]),
#"Changed Type" = Table.TransformColumnTypes(Source,{{"RNO_Condition", type text}, {"Amt", type number}})
in
#"Changed Type"
He escrito a continuación dax y basado en que estoy recibiendo la salida que se muestra a continuación
Pero estoy esperando la clasificación como la imagen de abajo.
Cualquier ayuda, por favor.
Gracias
Mohan V.
Solved! Go to Solution.
Hola, @MohanV , ya que desea clasificar las entradas dentro de un subgrupo, le sugiero que agregue una columna, ya sea en PQ o por columna calculada, para distinguir diferentes subgrupos.
#"Extract Prefix" = Table.AddColumn(#"Changed Type", "Category", each Text.Start([RNO_Condition], 5))
o usando la columna calculada
La medida es
Ranks =
VAR __cat = MAX ( 'Dataset'[Category] )
RETURN
RANKX (
FILTER ( ALL ( 'Dataset' ), 'Dataset'[Category] = __cat ),
CALCULATE ( MAX ( 'Dataset'[Amt] ) )
)
Thanks to the great efforts by MS engineers to simplify syntax of DAX! Most beginners are SUCCESSFULLY MISLED to think that they could easily master DAX; but it turns out that the intricacy of the most frequently used RANKX() is still way beyond their comprehension! |
DAX is simple, but NOT EASY! |
Hola, @MohanV , ya que desea clasificar las entradas dentro de un subgrupo, le sugiero que agregue una columna, ya sea en PQ o por columna calculada, para distinguir diferentes subgrupos.
#"Extract Prefix" = Table.AddColumn(#"Changed Type", "Category", each Text.Start([RNO_Condition], 5))
o usando la columna calculada
La medida es
Ranks =
VAR __cat = MAX ( 'Dataset'[Category] )
RETURN
RANKX (
FILTER ( ALL ( 'Dataset' ), 'Dataset'[Category] = __cat ),
CALCULATE ( MAX ( 'Dataset'[Amt] ) )
)
Thanks to the great efforts by MS engineers to simplify syntax of DAX! Most beginners are SUCCESSFULLY MISLED to think that they could easily master DAX; but it turns out that the intricacy of the most frequently used RANKX() is still way beyond their comprehension! |
DAX is simple, but NOT EASY! |
¿Su cálculo está creando grupos primero sobre la base del número de prefijo en RNO_Condition y luego la clasificación sobre la base de Amt?
@MohanV Mira esto.
https://community.powerbi.com/t5/Desktop/DAX-Ranking-within-a-group/td-p/261079
Avísame si aún necesitas ayuda. Escribiré la Expresión DAX para ti.
User | Count |
---|---|
1 | |
1 | |
1 | |
1 | |
1 |
User | Count |
---|---|
3 | |
2 | |
1 | |
1 | |
1 |