Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

Count a value as 1 when both date from different columns not null

Hi, I'm cretaing a conditional measure that count events from two diffrent columns that are related by a key . the date slicer is coming from a relationship table . I want to count them 1 when bot...
  • amitchandak's avatar
    4 years ago

    Anonymous ,
    Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.

     

    I may use an independent date table and check both are in range.

     

    Even if one joined I can force between on another date

     

    //Date 1 joined with and active , pushing filter to date 2
    new measure =
    var _max = maxx(allselected(Date),Date[Date])
    var _min = mainx(allselected(Date),Date[Date])
    return
    calculate( sum(Table[Value]), filter('Table', 'Table'[Date2] >=_min && 'Table'[Date2] <=_max))