Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
Hi,
Struggling to find the correct measure for my problem:
I have created following tablevisual:
Intakes = created with following measure:
AantalIntakes = COUNT(Intakes[Id])
Rank is created with following measure:
Above the names I will create a measure to display the beloning count of intakes and above that I will put their profilepic.
Would be very grateful if anyone could give me the desired solution.
Kind Regards,
Soof1234
Solved! Go to Solution.
Here are 3 measures that show one way to do it.
#1 =
VAR vSummary =
ADDCOLUMNS ( VALUES ( Products[ProductName] ), "cTS", [Total Sales] )
RETURN
MAXX (
TOPN ( 1, vSummary, [cTS], ASC ),
Products[ProductName]
)
#2 =
VAR vSummary =
ADDCOLUMNS ( VALUES ( Products[ProductName] ), "cTS", [Total Sales] )
RETURN
MAXX (
TOPN ( 1, TOPN ( 2, vSummary, [cTS], DESC ), [cTS], ASC ),
Products[ProductName]
)
#3 =
VAR vSummary =
ADDCOLUMNS ( VALUES ( Products[ProductName] ), "cTS", [Total Sales] )
RETURN
MAXX (
TOPN ( 1, TOPN ( 3, vSummary, [cTS], DESC ), [cTS], ASC ),
Products[ProductName]
)
Pat
Here are 3 measures that show one way to do it.
#1 =
VAR vSummary =
ADDCOLUMNS ( VALUES ( Products[ProductName] ), "cTS", [Total Sales] )
RETURN
MAXX (
TOPN ( 1, vSummary, [cTS], ASC ),
Products[ProductName]
)
#2 =
VAR vSummary =
ADDCOLUMNS ( VALUES ( Products[ProductName] ), "cTS", [Total Sales] )
RETURN
MAXX (
TOPN ( 1, TOPN ( 2, vSummary, [cTS], DESC ), [cTS], ASC ),
Products[ProductName]
)
#3 =
VAR vSummary =
ADDCOLUMNS ( VALUES ( Products[ProductName] ), "cTS", [Total Sales] )
RETURN
MAXX (
TOPN ( 1, TOPN ( 3, vSummary, [cTS], DESC ), [cTS], ASC ),
Products[ProductName]
)
Pat
Hi @ppm1 ,
Thanks, you are smarter than ChatGPT;) I changed [Total sales] to [ranking] instead in the measures. This because total sales could be the same value. However in my current setup people get the same ranking instead of making a continuous ranking when having the same value. See example below:
Above tablevisual results in below stage:
Obviously it needs to display Esmee either first or second. Thanks in advance!
Kind Regards,
Soof1234
Hi,
For Position 1, wouldn't you want to show "Esme, Francios"? Share the download link of the PBI file.
Here is one way to break those ties (alphabetically).
#1 =
VAR vSummary =
ADDCOLUMNS ( VALUES ( Products[ProductName] ), "cTS", [Total Sales] )
RETURN
MAXX (
TOPN ( 1, vSummary, [cTS], ASC, Products[ProductName], ASC ),
Products[ProductName]
)
Pat
Hi @ppm1 ,
Sorry, I forgot to mark your post as a solution. Probably over excited you made it work:). Thanks!
Do you also know how I can add a belonging image/profilepicture to the shape above the stage of position 1,2,3.
I tried conditionnal formatting and then select value and base the value on a measure I created. The measure retrieves an imageURL from column 'ProfilePic' in table Employees. Column 'ProfilePic.Url' is marked as an ImageURL column.
I added a sample file as PBIX. Hopefully you have the solution:)
Thanks in advance!
Kind Regards,
Soof1234
User | Count |
---|---|
126 | |
108 | |
99 | |
65 | |
62 |
User | Count |
---|---|
136 | |
113 | |
102 | |
71 | |
60 |