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

Get certified in Microsoft Fabric—for free! For a limited time, the Microsoft Fabric Community team will be offering free DP-600 exam vouchers. Prepare now

Reply
acg
Resolver I
Resolver I

Top 10 numbers called by duration of call

Just adding another post to clarify what I need.

Basically, I want this sql query translated into DAX:

 

SELECT TOP 10 To_Person,
Max(Call_Duration) as longest_call_duration

FROM [table]
where [date]= '2020-05-30'
group by
To_Person, Call_Duration

 

I Calculated Max Duration in Power BI like: 

Max Duration = Max('table'[Call_Duration])
 
Then used the slicer, added to_Number and used TopN 
by Max_Duration
 
But I do not get the same results. 
THere are no other filters in the slicer except for the date as in '2020-05-30'
 
Any ideas how this can be solved?
1 REPLY 1
VahidDM
Super User
Super User

Hi @acg 

 

Can you share a sample of your data here? do you want to create a table with to_Number column and just max10 duration?

 

You can add a RANK to your duration then filter that to 10.

 

Appreciate your Kudos✌️!!

Helpful resources

Announcements
OCT PBI Update Carousel

Power BI Monthly Update - October 2024

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

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

October NL Carousel

Fabric Community Update - October 2024

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

Top Kudoed Authors