The ultimate Microsoft Fabric, Power BI, Azure AI & SQL learning event! Join us in Las Vegas from March 26-28, 2024. Use code MSCUST for a $100 discount. Register Now
Hi Team,
I need top accounts profit and normal accounts profits difference in power bi so how can I do that in power bi.
Example actually I want the column like diff in profit in power bi
Accounts | Profit | Rank | Difference From top Rank | Diff in Profit |
A | 4030 | 2 | 1 | 0 |
B | 3424 | 4 | 3 | -606 |
C | 4348 | 1 | 0 | 318 |
D | 1087 | 7 | 6 | -2943 |
E | 2070 | 6 | 5 | -1960 |
F | 2702 | 5 | 4 | -1328 |
G | 3696 | 3 | 2 | -334 |
Thanks,
Arvind
Solved! Go to Solution.
Hi @arvindyadav ,
It's pleasant that your problem has been solved, could you please mark one reply as Answered to close this topic?
Regards,
Daniel He
Hi @arvindyadav
Try this for your calculated column if you want the rank in 'Difference From top Rank' as reference (as shown in your expected result):
Column = Table1[Profit]-LOOKUPVALUE(Table1[Profit];Table1[Difference From top Rank];1)
Although I think you might have made a mistake and want this, i.e., taking 'Rank' as reference:
Column2 = Table1[Profit]-LOOKUPVALUE(Table1[Profit];Table1[Rank];1)
Hi @AlB ,
Actually Rank and Difference From top rank is a measure which is created by me so how can lookup in that scenario.
I cannot help unless you describe the issue properly. You have measures, you claim. What is the code for those measures? Where and how are you using them? What is the table that you show, a table visual? What are the tables in your data model that would play a role in the calculations and their contents/relationships?
You could also just create a calculated column with the rank and then add the calculated column that I described earlier. That would probably be simpler
Hi @arvindyadav ,
It's pleasant that your problem has been solved, could you please mark one reply as Answered to close this topic?
Regards,
Daniel He
User | Count |
---|---|
160 | |
110 | |
96 | |
86 | |
75 |
User | Count |
---|---|
157 | |
137 | |
132 | |
81 | |
61 |