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

The Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.

Reply
evadung
Frequent Visitor

Moving average excluding days without data

Hello, 

 

I have this chart with moving average. I dont want to see 4th and 5th day because theres no data (theres more date without data, 4th and 5th is for example). I have no clue what to do.

evadung_1-1676360046697.png

 

Its from calculated measure from two tables:

 

Table1: date, hours1
Table2: date, hours2

(In those tables arent days with null or blank spaces.)

 

calculated measure: Produtivität = hours1/hours2

 

Moving average % =

averagex(
    FILTER(ALLSELECTED(Kalender),
    Kalender[Datum] <= MAX(Kalender[Datum])),
        [Produktivität])
 
1 ACCEPTED SOLUTION
wdx223_Daniel
Super User
Super User

Moving average % =IF( [Produktivität],

averagex(
    FILTER(ALLSELECTED(Kalender),
    Kalender[Datum] <= MAX(Kalender[Datum])),
        [Produktivität]))

View solution in original post

2 REPLIES 2
wdx223_Daniel
Super User
Super User

Moving average % =IF( [Produktivität],

averagex(
    FILTER(ALLSELECTED(Kalender),
    Kalender[Datum] <= MAX(Kalender[Datum])),
        [Produktivität]))

Works! Thank you!

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Feb2025 Sticker Challenge

Join our Community Sticker Challenge 2025

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

Feb2025 NL Carousel

Fabric Community Update - February 2025

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