Forum Discussion

musketta's avatar
musketta
New Member
2 months ago
Solved

Outstanding items from certain time periods

I'm quite new to Power Bi so any help would be grateful.   I have data in relation to equipment testing. Data contains Equipment Type, When its due for testing etc. Due date is formatted mmmm-yyyy ...
  • grazitti_sapna's avatar
    2 months ago

    Hi musketta,

     

    You can use below dax for 3 months, 3-6 months and above 6 months outstanding items:-

     

    Outstanding Previous 3 Months =
    VAR StartDate =
        EOMONTH(TODAY(), -4) + 1
    VAR EndDate =
        EOMONTH(TODAY(), -1)
    RETURN
    CALCULATE(
        COUNTROWS(Equipment),
        Equipment[Due Date] >= StartDate,
        Equipment[Due Date] <= EndDate
    )
    Outstanding 4 to 6 Months =
    VAR StartDate =
        EOMONTH(TODAY(), -7) + 1
    VAR EndDate =
        EOMONTH(TODAY(), -4)
    RETURN
    CALCULATE(
        COUNTROWS(Equipment),
        Equipment[Due Date] >= StartDate,
        Equipment[Due Date] <= EndDate
    )
    Outstanding Over 6 Months =
    VAR CutoffDate =
        EOMONTH(TODAY(), -7) + 1
    RETURN
    CALCULATE(
        COUNTROWS(Equipment),
        Equipment[Due Date] < CutoffDate
    )

     

    🌟 I hope this solution helps you unlock your Power BI potential! If you found it helpful, click 'Mark as Solution' to guide others toward the answers they need.
    πŸ’‘ Love the effort? Drop the kudos! Your appreciation fuels community spirit and innovation.
    πŸŽ– As a proud SuperUser and Microsoft Partner, we’re here to empower your data journey and the Power BI Community at large.
    πŸ”— Curious to explore more? [Discover here].
    Let’s keep building smarter solutions together!