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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

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.