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

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.

Reply
Jos13
Helper III
Helper III

Values greater than average duration

Hi All,

I have the following data

data.png

I have a measure as follows

Avg_resolution = AVERAGEX('Table','Table'[R_Time_sec])
tab.png

Is it possible to display those issues with average resolution greater than the average value(17,330). The required table visual will have "Issue 2". Kindly help me on this.

 

Thanks in advance 

1 ACCEPTED SOLUTION

Thanks for the file, use this:

Measure 4 =
VAR AvgRes =
    CALCULATE ( [Avg_resolution], ALL ( 'Table'[Issue] ) )
VAR Result =
    CALCULATE (
        [Avg_resolution],
        FILTER ( VALUES ( 'Table'[Issue] ), [Avg_resolution] > AvgRes )
    )
RETURN
    Result

View solution in original post

11 REPLIES 11
AntrikshSharma
Community Champion
Community Champion

if you want to show a list of issues greater than average then you could try this:

=
VAR AvgRes = [Avg_resolution]
VAR IssuesHigherThanAvg =
    FILTER (
        ADDCOLUMNS ( Table, "Average Resolution", [Avg_resolution] ),
        [Average Resolution] > AvgRes
    )
VAR Result =
    CONCATENATEX (
        IssuesHigherThanAvg,
        Table[Issue] & " " & [Average Resolution],
        ","
    )
RETURN
    Result

Hi @AntrikshSharma ,

This measure works fine. I tried to exclude the concatenate part since it is not required, then it generated some error.

My expected result will look like this

op 2.png

Thanks,

Jos

Sorry for the confusion.

 

The requirement is as follows. I only wanted to show issues with resolution time greater than the average resolution time.

op 2.png

 

Thanks,

Jos

Try this: Measure = VAR AvgRes = [Avg_resolution] VAR IssuesHigherThanAvg = FILTER ( Table, [Average Resolution] > AvgRes ) VAR Result = CALCULATE ( [Avg_resolution], IssuesHigherThanAvg ) RETURN Result

Hi,

This measure returns a different result.

Please find the pbix file below

https://drive.google.com/file/d/1UdmNQzsyCsLJ1qKT-4_7fkYzvDOHoqcn/view?usp=sharing

Thanks for the file, use this:

Measure 4 =
VAR AvgRes =
    CALCULATE ( [Avg_resolution], ALL ( 'Table'[Issue] ) )
VAR Result =
    CALCULATE (
        [Avg_resolution],
        FILTER ( VALUES ( 'Table'[Issue] ), [Avg_resolution] > AvgRes )
    )
RETURN
    Result

Thank you @AntrikshSharma 

Much appreciated 🙂.

Great! You're welcome! Have a great day! 🙂
amitchandak
Super User
Super User

@Jos13 , Try like

measure =
var _avg = calculate([Avg_resolution],all(Table))
return
Countx(filter(summarize('Table'[Job],"_1", [Avg_resolution]),[_1]>__avg),[Job])

Hi @amitchandak ,

I can filter the "Issue" using the measure suggested by you. This works only when I add the measure to table visual.

op1.png

I don't want to display measure in this visual. I just wanted to show issue with its duration.

Please let me know if it would be possible.

 

Thanks,

Jos

@Jos13 , My bad, it should be issues

 

measure =
var _avg = calculate([Avg_resolution],all(Table))
return
Countx(filter(summarize('Table','Table'[issues],"_1", [Avg_resolution]),[_1]>__avg),[Job])

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

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.