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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Anonymous
Not applicable

The average of a measure for the last 30 days

Hi experts,

 

I need help with a measure that gives me the average  output for the last 30 days.

The Measure i need a 30 days average for is the following

Measure:=
DIVIDE([Water];[Wastewater])

Where the Water is the following measure

water:=
SUMX (
	 'Table1';
	 'Table1'[Amount] * 'Table1'[conversion factor]
)

And wastewater is the following measure

Watewater:=
CALCULATE (
	SUM ( 'Table1'[Amount] );
	Table2[Reference] IN { "X1" }
)



 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

I Found a solution 

Measure :=
CALCULATE (
    AVERAGEX (
        SUMMARIZE ( 'Table1; Date[Dato]; "flow"; [Measure1] );
        [Mesure1]
    );
    FILTER ( ALL ( DAte[Dato] ); Date[Dato] > TODAY () - 32 )
)

View solution in original post

4 REPLIES 4
Anonymous
Not applicable

I Found a solution 

Measure :=
CALCULATE (
    AVERAGEX (
        SUMMARIZE ( 'Table1; Date[Dato]; "flow"; [Measure1] );
        [Mesure1]
    );
    FILTER ( ALL ( DAte[Dato] ); Date[Dato] > TODAY () - 32 )
)
tex628
Community Champion
Community Champion

True, My bad!


Connect on LinkedIn
tex628
Community Champion
Community Champion

Measure2 =
VAR tday= TODAY()
VAR tday_2 = tday-30
Return
CALCULATE( 
AVERAGE([Measure]),
'Calendar'[Date] <= tday,
'Calendar'[Date] >= tday_2
)

Connect on LinkedIn
Anonymous
Not applicable

i can't take the aveage of a measure in the function

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

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.