Forum Discussion
rob7one
3 years agoHelper I
Rankx with two subcategories
Hello guys, can someone tell what is wrong here? Rankx with 2 categories = CALCULATE(RANKX(ALL(a_notifi_list,a_notifi_list[Name 1 /vendor name]),a_notifi_list[Defective (external)],,DESC),a_...
- 3 years ago
rob7one A measure to capture supplier Rank by mm.yyyy and factory
Measure = RANKX ( FILTER ( ALL ( 'Table 1' ), 'Table 1'[mm.yyyy] = MAX ( 'Table 1'[mm.yyyy] ) && 'Table 1'[factory] = MAX ( 'Table 1'[factory] ) ), CALCULATE ( MAX ( 'Table 1'[amount of defects] ) ), , DESC, DENSE )PFA Workbook
rob7one
3 years agoHelper I
Hello Charlotte 🙂
here is a table with sample data:
| mm.yyyy | factory | supplier | amount of defects |
| 01.2022 | B | xx | 12 |
| 01.2022 | C | cc | 23 |
| 03.2022 | D | yx | 34 |
| 01.2022 | A | yc | 45 |
| 03.2022 | B | xy | 56 |
| 01.2022 | D | cx | 1 |
| 03.2022 | A | xx | 0 |
| 01.2022 | B | cc | 8 |
| 01.2022 | D | cx | 300 |
| 01.2022 | A | xy | 23 |
| 01.2022 | B | cy | 65 |
| 02.2022 | C | er | 87 |
| 02.2022 | D | tr | 11 |
| 01.2022 | C | xc | 65 |
| 01.2022 | D | cx | 300 |
| 01.2022 | A | xy | 23 |
| 01.2022 | B | cy | 65 |
| 02.2022 | C | tz | 87 |
| 02.2022 | D | kl | 67 |
| 02.2022 | E | qw | 101 |
| 03.2022 | C | tz | 87 |
| 02.2022 | D | kl | 67 |
| 02.2022 | E | qw | 101 |
| 02.2022 | E | qw | 101 |
| 02.2022 | C | tz | 87 |
| 02.2022 | D | kl | 67 |
| 02.2022 | E | qw | 101 |
| 02.2022 | C | tz | 87 |
| 02.2022 | D | kl | 67 |
| 02.2022 | E | qw | 101 |
| 02.2022 | C | tz | 87 |
| 02.2022 | D | kl | 67 |
| 03.2022 | E | qw | 101 |
| 03.2022 | C | tz | 87 |
| 03.2022 | D | kl | 67 |
| 02.2022 | E | qw | 101 |
| 03.2022 | C | tz | 87 |
| 02.2022 | D | kl | 67 |
| 02.2022 | E | qw | 101 |
| 02.2022 | C | tz | 87 |
| 03.2022 | D | kl | 67 |
| 02.2022 | E | qw | 101 |
| 01.2022 | A | yy | 1 |
| 01.2022 | B | xx | 12 |
| 01.2022 | C | cc | 23 |
| 03.2022 | D | yx | 34 |
| 01.2022 | A | yc | 45 |
| 03.2022 | B | xy | 56 |
| 01.2022 | C | cy | 56 |
| 01.2022 | D | xc | 45 |
| 01.2022 | A | cx | 34 |
| 01.2022 | B | yx | 23 |
| 01.2022 | C | cx | 12 |
| 01.2022 | D | cx | 1 |
| 03.2022 | A | xx | 0 |
| 01.2022 | B | cc | 8 |
| 01.2022 | C | xc | 65 |
| 01.2022 | D | cx | 300 |
| 01.2022 | A | xy | 23 |
| 04.2022 | B | cy | 65 |
| 02.2022 | C | er | 87 |
| 02.2022 | D | tr | 11 |
| 04.2022 | C | xc | 65 |
| 01.2022 | D | cx | 300 |
| 01.2022 | A | xy | 23 |
| 01.2022 | B | cy | 65 |
| 02.2022 | C | tz | 87 |
| 02.2022 | D | kl | 67 |
| 02.2022 | E | qw | 101 |
| 03.2022 | C | tz | 87 |
| 02.2022 | D | kl | 67 |
| 02.2022 | E | qw | 101 |
| 02.2022 | C | tz | 87 |
| 02.2022 | D | kl | 67 |
| 02.2022 | E | qw | 101 |
| 02.2022 | C | tz | 87 |
| 04.2022 | D | kl | 67 |
| 02.2022 | E | qw | 101 |
| 02.2022 | D | kl | 67 |
| 02.2022 | E | qw | 101 |
| 02.2022 | C | tz | 87 |
| 02.2022 | D | kl | 67 |
| 02.2022 | E | qw | 101 |
| 02.2022 | C | tz | 87 |
| 02.2022 | D | kl | 67 |
| 04.2022 | E | qw | 101 |
| 02.2022 | C | tz | 87 |
| 02.2022 | C | tz | 87 |
| 02.2022 | D | kl | 67 |
| 02.2022 | E | qw | 101 |
| 03.2022 | E | qw | 101 |
| 03.2022 | C | tz | 87 |
| 03.2022 | D | kl | 67 |
| 03.2022 | C | tz | 87 |
| 04.2022 | C | tz | 87 |
| 04.2022 | D | kl | 67 |
| 04.2022 | E | qw | 101 |
smpa01
3 years agoCommunity Champion
rob7one A measure to capture supplier Rank by mm.yyyy and factory
Measure =
RANKX (
FILTER (
ALL ( 'Table 1' ),
'Table 1'[mm.yyyy] = MAX ( 'Table 1'[mm.yyyy] )
&& 'Table 1'[factory] = MAX ( 'Table 1'[factory] )
),
CALCULATE ( MAX ( 'Table 1'[amount of defects] ) ),
,
DESC,
DENSE
)
PFA Workbook
- rob7one3 years agoHelper I
That could really help! i will check it tomorrow to verify my results! Thanks a lot my friend!
i use this rankx measure for an other visual:
A_rank top 5 history 2 = RANKX(ALL(a_notifi_list[vendor name]), CALCULATE(SUM(a_notifi_list[Defectives)])))it seems to work, but when i use it in a matrix like you can see below, it shows me for each vendor the value "1". i think that could be vendors which are not present with defects in the column of the month, but i'm not sure. Do you know how i can fix this? on the left side of the matrix are all vendors listed row by row.