Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

Reply
Anonymous
Not applicable

Return category name based on lowest average

Hello community,

 

I am trying to create an automatically updateable report with text that changes depending on the data.

 

I want to write: "You score the lowest on {this category}"

Therefore i need to first extract the lowest value which is calculated as the average of "Besvarelser[Indekskolonne]", and then get the right value name from the "Spørgeskema[Spørgsmål]".

In the bar chart at the bottom i have created the charts by filtering the chart by each value in "Spørgeskema[Spørgsmål]" and then added the value as "Average of Besvarelser[Indekskolonne]".

Is there anyway to automatically make it say "You score the lowest on Har jeg været glad og i godt humør", as that is the lowest score?

Current code is:

MentalSundhedTekst =
DISTINCTCOUNT(Besvarelser[Respondent ID])
& " har besvaret spørgeskemaet."
& UNICHAR ( 10 )
& IF([Indeksscore]>[OverordnetBenchmark],"Jeres indeksscore ligger over benchmarket med ", "Jeres indeksscore ligger under benchmarket med ")
& FIXED([Indeksscore]-[OverordnetBenchmark],0) & " procentpoint"
& UNICHAR ( 10 )
& "I scorer lavest på" & (CALCULATE(MIN(Besvarelser[Indekskolonne])))



Udklip.PNG

2 REPLIES 2
amitchandak
Super User
Super User

@Anonymous , we can create a rank on category ascending and if that is 1 we can say lowest in category

For Rank Refer these links
https://radacad.com/how-to-use-rankx-in-dax-part-2-of-3-calculated-measures
https://www.youtube.com/watch?v=DZb_6j6WuZ0

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

I have succesfully created a rank called "Rangering" however I can't figure out how to get the expression out in text.

CALCULATE(SELECTEDVALUE('Spørgeskema'[Spørgsmål]),([Rangering])) ?


Udklip2.PNG

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.