Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

Calulate open items from Previous month B/Forward

Hi Experts   My relationship between my Dim_Date Table and FACT table is based on Date and Created Date (FACT Table)   I am trying to work out how many items remained open in the previous periods...
  • Anonymous's avatar
    Anonymous
    5 years ago

    Hi Anonymous ,

    It seems like you want to calculate the count within the selected date period. You could use the following formula with Slicer :

    count =
    VAR _min =
        MIN ( 'DateSlicer'[Date] )
    VAR _max =
        MAX ( 'DateSlicer'[Date] )
    RETURN
        CALCULATE (
            COUNT ( 'STG Fact_To_Do'[Closed] ),
            FILTER (
                'STG Fact_To_Do',
                'STG Fact_To_Do'[Created_Date] <= _max
                    && 'STG Fact_To_Do'[Date_Closed] >= _min
            )
        )

    Did I answer your question ? Please mark my reply as solution. Thank you very much.

    If not, please upload some insensitive data samples and expected output.

     

    Best Regards,

    Eyelyn Qin