cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Lexey Regular Visitor
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!

 

Screenshot_9.jpg

https://drive.google.com/open?id=1HShO0E5ueQcIy-MMqxdlmi4DHOcFkz0_

 

1 ACCEPTED SOLUTION

Accepted Solutions
Vvelarde Super Contributor
Super Contributor

Re: the value of the average between the three periods

@Lexey

 

Using this model:

 

Img23.png

 

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 )

Img24.png

 

Regards

 

Victor




Lima - Peru
Did I answer your question? Mark my post as a solution!

Proud to be a Datanaut!




View solution in original post

4 REPLIES 4
Lexey Regular Visitor
Regular Visitor

Re: the value of the average between the three periods

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

Highlighted
Vvelarde Super Contributor
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
Did I answer your question? Mark my post as a solution!

Proud to be a Datanaut!




Vvelarde Super Contributor
Super Contributor

Re: the value of the average between the three periods

@Lexey

 

Using this model:

 

Img23.png

 

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 )

Img24.png

 

Regards

 

Victor




Lima - Peru
Did I answer your question? Mark my post as a solution!

Proud to be a Datanaut!




View solution in original post

Lexey Regular Visitor
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)Screenshot_1.jpg

Helpful resources

Announcements
Can You Solve These Challenge

Challenge: Can You Solve These?

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

Community News & Announcements

Community News & Announcements

Get your latest community news and announcements.

Virtual Launch Event

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.

Community Kudopalooza

Win Power BI Swag with Community Kudopalooza!

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

Users Online
Currently online: 42 members 938 guests
Please welcome our newest community members: