The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
Hi Everyone,
I have calculated the Rank of certain items available in table. Those Items values are changing month on month basis.
I want to exclude one of the group and then want to rank that particular group.
Raw Data
Group | Item | Value | |
One | item1 | 778 | |
One | item2 | 617 | |
One | item3 | 540 | |
Three | Item4 | 847 | |
Three | Item6 | 873 | |
Three | Item9 | 781 | |
Two | item8 | 512 | |
Two | Item10 | 785 | |
Two | item5 | 623 |
I have used given rank function to get the rank for each item
RankXDescMeasure3 = RANKX( FILTER( ALL( 'Table'[Group], 'Table'[Item] ), 'Table'[Group] = MAX('Table'[Group]) ), CALCULATE(SUM('Table'[Value])) , ,DESC )
Output is like
Group | Item | Value | Rank |
One | item1 | 778 | 1 |
One | item2 | 617 | 2 |
One | item3 | 540 | 3 |
Three | Item4 | 847 | 2 |
Three | Item6 | 873 | 1 |
Three | Item9 | 781 | 3 |
Two | item8 | 512 | 3 |
Two | Item10 | 785 | 1 |
Two | item5 | 623 | 2 |
Further used Rankx to calcualte the group wise rank
RankXDescMeasure2 = RANKX( ALL('Table'[Group]), CALCULATE( SUM('Table'[Value]) ), , DESC )
Group | Value | Rank1 |
One | 1935 | 2 |
Three | 2501 | 1 |
Two | 1920 | 3 |
Problem 1
Now, I want to exclude any of the desired group from the table, Say group one and want to Rank again?
Group | Value | Rank1 |
Three | 2501 | 1 |
Two | 1920 | 2 |
Apart from this my rank table values are changing month wise therefore I want to calculate a trend for group wise as well item wise to display the same in dashboard
Month | Group | Item | Value | Rank |
Jan | One | item1 | 965 | 1 |
Jan | One | item2 | 748 | 2 |
Jan | One | item3 | 659 | 3 |
Jan | Three | Item4 | 797 | 3 |
Jan | Three | Item6 | 826 | 2 |
Jan | Three | Item9 | 890 | 1 |
Jan | Two | item8 | 826 | 3 |
Jan | Two | Item10 | 692 | 2 |
Jan | Two | item5 | 913 | 1 |
Month | Group | Item | Value | Rank |
Feb | One | item1 | 778 | 1 |
Feb | One | item2 | 617 | 2 |
Feb | One | item3 | 540 | 3 |
Feb | Three | Item4 | 847 | 2 |
Feb | Three | Item6 | 873 | 1 |
Feb | Three | Item9 | 781 | 3 |
Feb | Two | item8 | 512 | 3 |
Feb | Two | Item10 | 785 | 1 |
Feb | Two | item5 | 623 | 2 |
Problem 2 (Last to month to this month Rank difference)
Here, I would like to calculate this month to Last Month Rank difference
Item wise trend would be last month rank to this month rank difference e.g. = Trend = Item 6 (this month)-Item6(last month) = 1-2=-1
Dashboard represntation would be like
Is it possible???
Kindly help as I am unable to fetch the results.
@Greg_Deckler could you please help as I am refeering your Bleep with Rankx article
Regards
Uphar
User | Count |
---|---|
17 | |
8 | |
7 | |
6 | |
6 |
User | Count |
---|---|
26 | |
13 | |
12 | |
9 | |
8 |