Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

Power BI Filter a Date column by another Date Column

I am new to Power BI and have a specific report request. My base table looks like below.   Requirement #1 : Whenever, end user selects a specific 'Business Date', then the 'Due Date' which on...
  • amitchandak's avatar
    6 years ago

    create as column
    Days diff = datediff([Business Date],[Due day], day)
    Create a bucket on top of if

    Have slicer on Business Date.
    Create measure

    loan =
    var _max = maxx(table,table[Business Date])
    return
    CALCULATE(count(table[Loan]),[Due day] >=_max)

  • Mariusz's avatar
    6 years ago

    Hi Anonymous 

     

    To achieve the second requirement you can add a simple column like the one below

    Day Diff = 
    VAR __dayDiff = 'Table'[Due Date] - 'Table'[Bussiness_Date] 
    RETURN IF( __dayDiff >= 0, __dayDiff )

    For the first requirement, the table visual or any other visual can not propagate itself, therefore, you can use another visual or slicer to select Bussiness date and add your newly created column to the Filter Panes / Filters on this visual section with a setup as below.

     
    Please see the attached file wit a solution for reference.
     
    Best Regards,
    Mariusz

    If this post helps, then please consider Accepting it as the solution.

    Please feel free to connect with me.
    LinkedIn