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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

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
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

Find out what's new and trending in the Fabric Community.