cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Keha
Frequent Visitor

Cumulative Measure - Set static Start Date

Dear experts,

 

I have run into a problem revolving around cumulative measures and I was hoping that you would be able to assist. What I am trying to achive is to display a bouncerate change over time (days 0 - 31; in %) in a graph. I have reached that result with a cumulative measure and the ALLSELECTED Filter. However with this making the graph beginn with 0 bouncerate. I would like it to start from the End Value of the previous day so I can see a clear negative/positive movement.

 

 

The Measure I use is the following. I think I have to switch out the ALLSELECTED Filter, or Add something to it?

 

Test1 = IF (

    MIN ( 'DateDimension'[Date] )

        <= CALCULATE ( MAX ( 'Table'[Date] ); ALL ( 'Table' ) ); 

CALCULATE (

    SUM('Table'[Bounces])/SUM('Table'[Sessions]);

    FILTER (

        ALLSELECTED(Datedimension);

        'Datedimension'[Date] <= MAX ( 'Datedimension'[Date] )

            && 'Datedimension'[Date] <= TODAY()

    )

)

)

 

 

I think it could workout if I use the following. With this the Graph is starting with a value. However, the underlying Data is taken from the whole Dataset and not only the selected year (e.g. 2017). Is there a way to add some sort of start Date to it which would be the starting date of the year (e.g. 2017)?

 

Test1 = IF (

    MIN ( 'DateDimension'[Date] )

        <= CALCULATE ( MAX ( 'Table'[Date] ); ALL ( 'Table' ) ); 

CALCULATE (

    SUM('Table'[Bounces])/SUM('Table'[Sessions]);

    FILTER (

        ALL(‚Datedimension‘ [Date]);

        'Datedimension'[Date] <= MAX ( 'Datedimension'[Date] )

            && 'Datedimension'[Date] <= TODAY()

    )

)

)

 

I have attached two Screenshots to visualize the problem attached.

 

https://ibb.co/mqNLDv
https://ibb.co/dcK0Dv

 

Thanks so much in advance! If you need more data please let me know.

 

Kevin

1 ACCEPTED SOLUTION
Keha
Frequent Visitor

I think I got it to work with:

 

Test1 = IF (

    MIN ( 'DateDimension'[Date] )

        <= CALCULATE ( MAX ( 'Table'[Date] ); ALL ( 'Table' ) ); 

CALCULATE (

    SUM('Table'[Bounces])/SUM('Table'[Sessions]);

    DATESYTD( Datedimension[Date] ) ) 

)

 

Thank you anyways!! 

 

View solution in original post

2 REPLIES 2
Keha
Frequent Visitor

I think I got it to work with:

 

Test1 = IF (

    MIN ( 'DateDimension'[Date] )

        <= CALCULATE ( MAX ( 'Table'[Date] ); ALL ( 'Table' ) ); 

CALCULATE (

    SUM('Table'[Bounces])/SUM('Table'[Sessions]);

    DATESYTD( Datedimension[Date] ) ) 

)

 

Thank you anyways!! 

 

Hi @Keha,

Do you resolve your issue? If it does, please mark the corresponding reply as answer, so other people will find solution easily. If it doesn't, please don't hesitate to ask.

Best Regards,
Angelia

Helpful resources

Announcements
PBI Sept Update Carousel

Power BI September 2023 Update

Take a look at the September 2023 Power BI update to learn more.

Learn Live

Learn Live: Event Series

Join Microsoft Reactor and learn from developers.

Dashboard in a day with date

Exclusive opportunity for Women!

Join us for a free, hands-on Microsoft workshop led by women trainers for women where you will learn how to build a Dashboard in a Day!

MPPC 2023 PBI Carousel

Power Platform Conference-Power BI and Fabric Sessions

Join us Oct 1 - 6 in Las Vegas for the Microsoft Power Platform Conference.

Top Solution Authors