The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
I currently have this statement:
Top IFD Store Current IFD =
var
rankcontext = values('All Open Retail Locations'[Division-Store])
return
calculate( [Current IFD],
topn(1, all('All Open Retail Locations'[Division-Store]), [Current IFD] ),
rankcontext )
It is returning the [Current IFD]. I need it to return the [Division-Store]. I am trying to create a table that shows the top store for each district. My table will look like this, excepet it will only display one store per district not all the stores in all districts.
@A_Scott , try like
maxx(topn(1, all('All Open Retail Locations'[Division-Store]), [Current IFD] ),'All Open Retail Locations'[Division-Store])
Also, consider index function
Power BI Index function: Top/Bottom Performer by name and value- https://youtu.be/HPhzzCwe10U
User | Count |
---|---|
11 | |
8 | |
6 | |
6 | |
6 |
User | Count |
---|---|
24 | |
14 | |
13 | |
10 | |
7 |