cancel
Showing results for
Did you mean:
Regular Visitor

## the value of the average between the three periods

Hi friends!
There is a fact table with the result of product sales by date. It is necessary to get the average value
between the three periods is selected in the slicers.

I will be glad of any help!

1 ACCEPTED SOLUTION

Accepted Solutions
Super Contributor

## Re: the value of the average between the three periods

@Lexey

Using this model:

And a Measure Like This:

```Measure =
VAR TotalTA =
CALCULATE (
SUM ( '1'[sales] );
TREATAS ( VALUES ( 'Dates1'[Date] ); '1'[date] );
ALL ( '1' )
)
VAR TotalTB =
CALCULATE (
SUM ( '1'[sales] );
TREATAS ( VALUES ( 'Dates2'[Date] ); '1'[date] );
ALL ( '1' )
)
VAR TotalTC =
CALCULATE (
SUM ( '1'[sales] );
TREATAS ( VALUES ( 'Dates3'[Date] ); '1'[date] );
ALL ( '1' )
)
RETURN
DIVIDE ( TotalTA + TotalTB + TotalTC; 3 )```

Regards

Victor

Lima - Peru

Proud to be a Datanaut!

4 REPLIES 4
Highlighted
Regular Visitor

## Re: the value of the average between the three periods

really? no solution to find the average for each product?

Super Contributor

## Re: the value of the average between the three periods

@Lexey

The only that imagine is duplicate your Fact Table many times of slicers you want.

Lima - Peru

Proud to be a Datanaut!

Super Contributor

## Re: the value of the average between the three periods

@Lexey

Using this model:

And a Measure Like This:

```Measure =
VAR TotalTA =
CALCULATE (
SUM ( '1'[sales] );
TREATAS ( VALUES ( 'Dates1'[Date] ); '1'[date] );
ALL ( '1' )
)
VAR TotalTB =
CALCULATE (
SUM ( '1'[sales] );
TREATAS ( VALUES ( 'Dates2'[Date] ); '1'[date] );
ALL ( '1' )
)
VAR TotalTC =
CALCULATE (
SUM ( '1'[sales] );
TREATAS ( VALUES ( 'Dates3'[Date] ); '1'[date] );
ALL ( '1' )
)
RETURN
DIVIDE ( TotalTA + TotalTB + TotalTC; 3 )```

Regards

Victor

Lima - Peru

Proud to be a Datanaut!

Regular Visitor

## Re: the value of the average between the three periods

super! Thank you! Now I'm one step closer to the solution!

Only I need an average for each product, I'll try to find a solution)

Announcements

#### Community Highlights

Find out what's new in the Power BI Community!

#### Power Platform Summit North America

Register by September 5 to save \$200

#### Microsoft Business Applications Virtual Launch Event

Watch the event on demand for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

#### Watch Sessions On Demand!

Continue your learning in our online communities.

Top Kudoed Authors
Users Online
Currently online: 105 members 1,551 guests
Recent signins: