Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

selecting all rows after a minimum value within a group.

Hi fellow Power BI developers, Need help in creating DAX - calculated table. Please let me know if the below description is not clear.  I have data in the below format.  row_no user_id campai...
  • Anonymous's avatar
    Anonymous
    4 years ago

    Anonymous 

    The sample pbix is import mode otherwise you cannot access the data, but the steps should also work with Direct Query.


    Since you are using direct query, you cannot create calculate table, instead you can add a distinct in power query. This table is used as slicer to filter your original table when comparing using dax. 

    Measure =
    var SelectedID_Date = CALCULATE(MAX([date]),FILTER(ALL('Table'),'Table'[campaign_id]=SELECTEDVALUE(campaign_id[Column1])))
    Return IF(MAX([date])>=SelectedID_Date,"true")


    Paul Zheng _ Community Support Team
    If this post helps, please Accept it as the solution to help the other members find it more quickly.