Power BI Exchange

Please login or click SIGN UP FOR FREE to create your PowerBIUG account to join this user group.
 View Only
  • 1.  View previous date sum

    Bronze Contributor
    Posted Jul 12, 2022 04:16 AM
    Edited by Prem Guru Jul 12, 2022 04:33 AM
    Hi All,

    Below is sample data, were I'm trying to achieve sum of previous day/date;

    For e.g. on today's date i.e. if it's Jul'12, I should get a sum of previous date i.e. of Jul'11, which will be

    On tomorrow's date, I should get a sum of Jul'12 i.e.

    I tried with relative day filtering (in the last 1 day), but it is not giving a sum of today's date.

    See below: for Card 1, I used below measure:
    Previous Day Amount = CALCULATE(SUM(Tracker[Amount]),PREVIOUSDAY(Tracker[Date ])) - which is giving blank

    for Card 2 - I used Relative date. If I say in the last 1 day, i still get a blank and if we say in the last 2 days, so I get the appropriate value.

    Please advise. Thanks! as always.

    Prem Guru

  • 2.  RE: View previous date sum

    Posted Jul 13, 2022 11:07 PM

    Previous Day Amount =
    VAR Var1 =
        MAXX (
            FILTER ( ALL ( Tracker[DATE] ), [DATE] < MAX ( Tracker[DATE] ) ),
        CALCULATE ( SUM ( Tracker[AMOUNT] ), Tracker[DATE] = Var1 )​

    Vilmar Santos

  • 3.  RE: View previous date sum

    Posted Jul 15, 2022 01:56 PM

    Hi Prem,
    In your Calendar create column Rank, then create column Rank related and then just use filter.

    I am tired to copy/paste same solution as last 2 weeks I did it already 3 time. Review forum, you'll find it.


    Adam Artur Boltryk
    Business Analyst