cancel
Showing results for
Did you mean:
Frequent Visitor

## Average of result grouped by dates

I have a table of the format

Date    Result

4/11     F

4/11     F

4/12     P

4/12     F

4/12     P

I need to get the average of pass and fail records per date to plot a chart as below

Date    PassAvg   FailAvg

4/11     0               100%(i.e,2*100/2)

4/12     66.6%       33.3%

How can I achieve this?

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Super Contributor

## Re: Average of result grouped by dates

@perplexedDev

There's 2 ways to do this. I'll give you both because inevitably someone will read this and try to give you the easy way...

First (not the way I would do it - but its faster)

You need to write only 1 Measure - and create a Matrix - place fields as in the picture!

Second you have to write 5 simple Measures but it gives you more flexibilty later on... for other visualiazations including charts

I may post a chart later which you can't do with the first method

Hope this helps!

5 REPLIES 5
Highlighted
Super Contributor

## Re: Average of result grouped by dates

@perplexedDev

There's 2 ways to do this. I'll give you both because inevitably someone will read this and try to give you the easy way...

First (not the way I would do it - but its faster)

You need to write only 1 Measure - and create a Matrix - place fields as in the picture!

Second you have to write 5 simple Measures but it gives you more flexibilty later on... for other visualiazations including charts

I may post a chart later which you can't do with the first method

Hope this helps!

Frequent Visitor

## Re: Average of result grouped by dates

The secod solution works perfectly. I had one question though, how did you add the percentage sign for Avg measures?

Super Contributor

## Re: Average of result grouped by dates

Modeling Tab => Format: => select Percentage

Frequent Visitor

## Re: Average of result grouped by dates

Thank you so much. Sorry for my ignorance,I am new to excel and power BI.

Member

## Re: Average of result grouped by dates

Hi,

But what about the dates grouping, in this case by day?

Fernando

Announcements

#### Challenge: Can You Solve These?

Find out how to participate in the first Power BI 'Can You Solve These?' challenge.

#### Community News & Announcements

Get your latest community news and announcements.

#### Microsoft Business Applications October Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

#### Win Power BI Swag with Community Kudopalooza!

Each week, complete activities and be qualified in the drawing for cool Power BI Swag.

Top Kudoed Authors
Users Online
Currently online: 108 members 1,645 guests
Recent signins: