Power BI Exchange

Please login or click SIGN UP FOR FREE to create your PowerBIUG account to join this user group.
Expand all | Collapse all

Filter for calculating the actual day for YTD

  • 1.  Filter for calculating the actual day for YTD

    Bronze Contributor
    Posted 28 days ago
    Hi

    I am using the following DAX to generate a TRUE or FALSE in the date Table

    =var
    max_monthday = format (month (max('Sales Invoice'[PostingDate]) ); "00") & format (day (max('Sales Invoice'[PostingDate]) ); "00")

    var
    monthday = format (month ( 'Date'[Date] ); "00" ) & format (day ( 'Date'[Date] ); "00")

    Return
    monthday < max_monthday


    Now I want to expand the syntax by only reading records in the 'Sales Invoice" Table where in the column "Source" is the value "NAV". So only "NAV" records should be considered when calculating the max Posting Date.

    Best
    Andreas

    ------------------------------
    Andreas Ratz
    CEO
    Widnau
    +41798055000
    ------------------------------
    Conference-PBI_200x200


  • 2.  RE: Filter for calculating the actual day for YTD

    Bronze Contributor
    Posted 27 days ago
    Hi,
    Use MAXX formula instead of MAX, for example MAXX(filter('Sales Invoice',[Source]="NAV"),[PostingDate]) instead of max('Sales Invoice'[PostingDate])

    ------------------------------
    Mohamed Ibrahim
    ------------------------------

    Conference-PBI_200x200