Hi
I need some help for issue with RANKX function with DAX. (I tried learn it from net, but when i populate in my data table, it does not work.
- My data source : I have only one source table in the model.
- I need Rank of Product in one column and Rank of Product with Material in another column.
Function are Rank Total Profit by Product SUM:=RANKX(ALL(fUnits[Product]),CALCULATE(SUM(fUnits[Profit]))) Rank Total Profit by Product within Manuf:=IF(HASONEVALUE(fUnits[Product]),RANKX(ALLEXCEPT(fUnits,fUnits[Product]),CALCULATE(SUM(fUnits[Profit]))))
Report view
<colgroup><col><col><col><col><col></colgroup><tbody>
</tbody>
Data Table Source : This is only sample hence total any different from report view
<colgroup><col><col><col><col><col></colgroup><tbody>
</tbody>
I need some help for issue with RANKX function with DAX. (I tried learn it from net, but when i populate in my data table, it does not work.
- My data source : I have only one source table in the model.
- I need Rank of Product in one column and Rank of Product with Material in another column.
Function are Rank Total Profit by Product SUM:=RANKX(ALL(fUnits[Product]),CALCULATE(SUM(fUnits[Profit]))) Rank Total Profit by Product within Manuf:=IF(HASONEVALUE(fUnits[Product]),RANKX(ALLEXCEPT(fUnits,fUnits[Product]),CALCULATE(SUM(fUnits[Profit]))))
Report view
Manufacturer | Product | Total Profit | Rank Total Profit by Product SUM | #Rank Total Profit by Product within Manuf |
Bower Booms | 3 MTA | $142,960.18 | 1 | 1 |
Bower Booms | Aussie Quad | $131,252.83 | 2 | 1 |
Channel Craft | Kangaroo | $135,467.69 | 1 | 1 |
Channel Craft | Omega | $125,677.40 | 2 | 1 |
Channel Craft | V Rang | $82,626.53 | 3 | 1 |
Colorado Boomerangs | Aspen | $288,120.81 | 1 | 1 |
Colorado Boomerangs | Crested Beaut | $225,621.64 | 2 | 1 |
Colorado Boomerangs | Yanaki | $164,658.41 | 3 | 1 |
Gel Boomerangs | Bellen | $273,704.07 | 2 | 1 |
Gel Boomerangs | Quad | $495,972.38 | 1 | 1 |
Gel Boomerangs | Sunshine | $194,931.77 | 3 | 1 |
Manu Rangs | Manu Distance | $208,751.21 | 1 | 1 |
Manu Rangs | Manu MTA | $203,058.35 | 2 | 1 |
Turning Point | Darnell Fast Catch | $361,857.45 | 1 | 1 |
Turning Point | Darnell V | $187,139.27 | 2 | 1 |
Turning Point | Try Fly | $82,962.20 | 3 | 1 |
Grand Total | $3,304,762.19 | 1 |
<colgroup><col><col><col><col><col></colgroup><tbody>
</tbody>
Data Table Source : This is only sample hence total any different from report view
Date | Product | Units | Profit | Manufacturer |
01/09/2017 | Sunshine | 29 | 235.52 | Gel Boomerangs |
28/02/2017 | Yanaki | 7 | 58.68 | Colorado Boomerangs |
27/10/2017 | Darnell Fast Catch | 2 | 32.19 | Turning Point |
27/09/2017 | Try Fly | 3 | 16.32 | Turning Point |
21/07/2017 | Aussie Quad | 6 | 128.45 | Bower Booms |
06/08/2017 | Yanaki | 3 | 25.15 | Colorado Boomerangs |
08/04/2017 | Bellen | 2 | 18.46 | Gel Boomerangs |
27/05/2017 | Yanaki | 2 | 16.77 | Colorado Boomerangs |
17/09/2017 | Quad | 12 | 290.07 | Gel Boomerangs |
28/11/2017 | V Rang | 27 | 104.77 | Channel Craft |
05/02/2017 | Manu Distance | 1 | 72.91 | Manu Rangs |
23/08/2017 | Crested Beaut | 34 | 361.11 | Colorado Boomerangs |
03/07/2017 | Darnell V | 3 | 13.26 | Turning Point |
10/08/2017 | Sunshine | 2 | 16.24 | Gel Boomerangs |
11/06/2017 | Try Fly | 3 | 16.32 | Turning Point |
05/07/2017 | Aussie Quad | 3 | 64.22 | Bower Booms |
06/09/2017 | Darnell V | 43 | 190.12 | Turning Point |
04/01/2017 | Bellen | 3 | 27.69 | Gel Boomerangs |
18/05/2017 | Sunshine | 7 | 56.85 | Gel Boomerangs |
<colgroup><col><col><col><col><col></colgroup><tbody>
</tbody>