Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
I have a list of companies (company_name) and their money amounts. I also have the line of business that the companies are in.
I need to show (in a card) that line of business that has the most total money out of the top 4 companies listed here.
Note:
This would be easily achieved using top filter if the requirement was to show the top line of business out of the whole data. That would in this case be "siivous" as its money totals to 12000 which is more than any other category.
However what I need is to dynamically get a "subset of top 4 companies" AND then take top category out of those.
This would in this example result in "it-ala" being the biggest line of business out of that subset with 10000 as money amount.
Can this be achieved in any way?
That returns me the top sum of money, but how can I get the "line of business" that has the most total money out of the top 4 companies in that list?
@RandomWombsis , do need TOP one based on two columns
2 column top N = CALCULATE([Sum of Money], TOPN(1, SUMMARIZE(ALLSELECTED('Table'), 'Table'[Line of business], 'Table'[Company]), [Sum of Money],DESC),VALUES('Table'[Line of business]), VALUES('Table'[Company]) )
or
maxx( TOPN(1, SUMMARIZE(ALLSELECTED('Table'), 'Table'[Line of business], 'Table'[Company]), [Sum of Money],DESC),VALUES('Table'[Line of business]),[Company])
or
Concatenatex( TOPN(1, SUMMARIZE(ALLSELECTED('Table'), 'Table'[Line of business], 'Table'[Company]), [Sum of Money],DESC),VALUES('Table'[Line of business]),[Company] || '-' || [Line of business])
@RandomWombsis , do need TOP one based on two columns
2 column top N = CALCULATE([Sum of Money], TOPN(1, SUMMARIZE(ALLSELECTED('Table'), 'Table'[Line of business], 'Table'[Company]), [Sum of Money],DESC),VALUES('Table'[Line of business]), VALUES('Table'[Company]) )
or
maxx( TOPN(1, SUMMARIZE(ALLSELECTED('Table'), 'Table'[Line of business], 'Table'[Company]), [Sum of Money],DESC),VALUES('Table'[Line of business]),[Company])
or
Concatenatex( TOPN(1, SUMMARIZE(ALLSELECTED('Table'), 'Table'[Line of business], 'Table'[Company]), [Sum of Money],DESC),VALUES('Table'[Line of business]),[Company] || '-' || [Line of business])
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
55 | |
25 | |
23 | |
14 | |
11 |
User | Count |
---|---|
78 | |
63 | |
47 | |
17 | |
12 |