Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more.
Get startedGrow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.
Hello community,
I learned that you can put names on measure and use them on cards, made a test and it worked.
What I need, and have not being able to do, was create a measure that show the name of the worst agent I have.
Sample
Agent Values
Bruno 1
Andre 2
I'd need a measure that returns in this case "Bruno"
Solved! Go to Solution.
This is what I did to come up with a solution.
I created a table that has the following:
Agent Sales
Bruno 1
Gina 9
Jim 3
Sara 7
I then created the following Measures:
Sales Units = SUM(Table1[Sales])
MinimumValue = MINX(VALUES(Table1[Agent], [Sales Units])
To obtain the Name of the ‘worst’ agent with the lowest Sales I used the DAX function, FIRSTNONBLANK(). The following measure should return the Name of the ‘worst’ agent on a Card.
WorstValueName = FIRSTNONBLANK(Table1[Agent],IF([Sales Units] = CALCULATE([MinimumValue],VALUES(Table1[Agent])),1,BLANK()))
Note: I don’t believe this takes into account if there is a tie between the ‘worst’ amount of sales for multiple names.
I referenced the following link to create this: https://www.powerpivotpro.com/2012/06/top-selling-product-using-firstnonblank/
Hope this helps!
Greg G.
This is what I did to come up with a solution.
I created a table that has the following:
Agent Sales
Bruno 1
Gina 9
Jim 3
Sara 7
I then created the following Measures:
Sales Units = SUM(Table1[Sales])
MinimumValue = MINX(VALUES(Table1[Agent], [Sales Units])
To obtain the Name of the ‘worst’ agent with the lowest Sales I used the DAX function, FIRSTNONBLANK(). The following measure should return the Name of the ‘worst’ agent on a Card.
WorstValueName = FIRSTNONBLANK(Table1[Agent],IF([Sales Units] = CALCULATE([MinimumValue],VALUES(Table1[Agent])),1,BLANK()))
Note: I don’t believe this takes into account if there is a tie between the ‘worst’ amount of sales for multiple names.
I referenced the following link to create this: https://www.powerpivotpro.com/2012/06/top-selling-product-using-firstnonblank/
Hope this helps!
Greg G.
I hope you could describe more about what you have(Sample with 2 columns: Agent and Value) and what action you will do with your report and the expectation result in chart/card? So I could propose solution to solve your problem
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
User | Count |
---|---|
88 | |
85 | |
68 | |
68 | |
64 |
User | Count |
---|---|
210 | |
118 | |
116 | |
81 | |
74 |