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 29 days ago
    Edited by Prem Guru 29 days ago
    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
    $115,354

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

    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 27 days ago
    Tente

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


    ------------------------------
    Vilmar Santos
    ------------------------------



  • 3.  RE: View previous date sum

    Posted 26 days ago

    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.

    Regards,



    ------------------------------
    Adam Artur Boltryk
    Business Analyst
    ------------------------------