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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
hannahemeredith
Regular Visitor

Non-numerical averages

Hello,

 

I'm very new to Power Bi, so I apologize in advance for asking such an easy question. I'm trying to display the average gate wait time for passengers at an airport. Responses came directly from a survey. Gates are listed as A1, A2, A3... and gate wait time is listed as "Less than 15 min", "16 to 30 mins", "31 to 59 mins", .... "More than 2 hrs". I'm trying to display the average gate wait time per gate. I'm sure it's easy to do but it is proving difficult as the responses are non numeric. How would I do this?

 

Thanks!Capture.JPG

1 ACCEPTED SOLUTION
Greg_Deckler
Super User
Super User

So, you need to use a SWITCH statement in a calculated column to convert the text responses to some numeric value.


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

View solution in original post

2 REPLIES 2
v-piga-msft
Resident Rockstar
Resident Rockstar

Hi @hannahemeredith

 

Have you solved the problem with the method @Greg_Deckler mentioned?

 

If you have solved, please accept the replies making sense as solution to your question so that people who may have the same question can get the solution directly.

 

If you still need help, could you share a dummy pbix file which can reproduce the scenario and your expected output, so that we can help further investigate on it? You can upload it to OneDrive or Dropbox and post the link here. Do mask sensitive data before uploading.)

 

Best Regards,

Cherry

Community Support Team _ Cherry Gao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Greg_Deckler
Super User
Super User

So, you need to use a SWITCH statement in a calculated column to convert the text responses to some numeric value.


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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