Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Can anyone please advise on what is the correct way of writing a DAX query for count above average? I've tried the following syntax, but it doesn't seem to be working:
measureAverage =
VAR averageRevenue =
CALCULATE ( AVERAGE ( 'Query2'[DaysDiff] ), ALL ( 'Query2' ) )
RETURN
IF ( SUM ( 'Query2'[DaysDiff] ) >= averageRevenue, SUM ( 'Query2'[DaysDiff] ) )
The visual just shows (Blank)
Thanks
@Anonymous
Try this pattern
measureAverage = VAR averageRevenue = CALCULATE ( AVERAGE ( 'Query2'[DaysDiff] ), ALL ( 'Query2' ) ) RETURN COUNTX ( FILTER ( ALL ( 'Query2' ), CALCULATE ( SUM ( 'Query2'[DaysDiff] ) ) >= averageRevenue ), 1 )
Thank you @Zubair_Muhammad, however it isn't showing the data tha I'm after. I have a table with customers and their daysover due. I'm running an average measure to find the average, but I need to find out which customers are going above the average days overdue. Have you got an idea how to solve this?
Hi @Anonymous
Could you share some data sample and expected output? You can upload it to OneDrive or Dropbox and post the link here.
Regards,
Cherie
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
115 | |
99 | |
88 | |
70 | |
62 |
User | Count |
---|---|
151 | |
120 | |
103 | |
87 | |
68 |