Forum Discussion

Saurabh129's avatar
Saurabh129
Frequent Visitor
2 years ago

Help needed with DAX measure - Quick

Looking for help with DAX

I have a measure [Homes Completed] which calculates the number of homes completed by the completion date

dim_date table is connected to the completion date

I have a date slicer visual in  report as well  with start date and end date 

I am looking for a new measure which will show Homes completed before the end date in the date slicer, irrespective of the start date

In short, I want the start date in the slicer  to be ignored for the new measure

thanks for your help with this

2 Replies

  • Saurabh129 , Created a disconnected date table, do not join with date of you table and then have measure like

     

    Completed before selected=

    var _max = maxx(allselected(Date), date[Date])

    return

    countrows(filter(Table, Table[End Date] < _max))

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi, Saurabh129 

    Thanks for the reply from amitchandak , please allow me to provide another insight:

    Maybe you can create a new measure and try the following dax:

    Homes Completed Before End Date = 
    CALCULATE(
        [Homes Completed],
        FILTER(
            ALL(dim_date[Date]),
            dim_date[Date] <= MAX(dim_date[Date])
        )
    )

     

    How to Get Your Question Answered Quickly 

    Best Regards

    Yongkang Hua

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.