Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more
I have phone_numbers that were called over time, how often they were called and the duration of each call.
I need two calculations:
1) Top 10 most called numbers by number of calls received
2) Top 10 most called numbers by duration of call
the varibles I have: Phone_Number , date, call_duration
What DAX can I write to resolve these two calculations?
For Question 1) Top 10 most called numbers by number of calls received: I tried:
Top 10 can be resolved with the filter.
                     
CNT Calls =
CALCULATE (
DISTINCTCOUNT( table[Phone_Number]),
FILTER ( table, table[date])
)
What do I need to change as my count is not correct. The date? How can I write this?
For Question 2) Top 10 most often called numbers by duration of call: I tried:
Top 10 can be resolved with the filter.
CNT of Calls by Duration=
COUNT(
DISTINCTCOUNT( table[Phone_Number]),
FILTER ( table, table[duration])
)
What do I need to change to get the calls by duration?
How can I implement a second filter, say I want only County= AUS ?
Thank you, I am still new to DAX and still find it challenging to get used to.
Solved! Go to Solution.
@acg , TRy measures like these
calls = count( table[Phone_Number])
Total Duration = Sum(table[duration])
TOP 10 by call = calculate([calls],TOPN(4,allselected(table[Phone_Number]),[calls],DESC), values(table[Phone_Number]))
Top 10 by duration = calculate([Total Duration],TOPN(4,allselected(table[Phone_Number]),[Total Duration ],DESC), values(table[Phone_Number]))
@acg , TRy measures like these
calls = count( table[Phone_Number])
Total Duration = Sum(table[duration])
TOP 10 by call = calculate([calls],TOPN(4,allselected(table[Phone_Number]),[calls],DESC), values(table[Phone_Number]))
Top 10 by duration = calculate([Total Duration],TOPN(4,allselected(table[Phone_Number]),[Total Duration ],DESC), values(table[Phone_Number]))
@amitchandak I am having trouble to incorporate the Measure: CNT To_Person
and receive the mistake as below. Is the measure at the right place?
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.
            | User | Count | 
|---|---|
| 8 | |
| 5 | |
| 5 | |
| 4 | |
| 3 | 
| User | Count | 
|---|---|
| 24 | |
| 11 | |
| 10 | |
| 9 | |
| 8 |