Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

Need Help to resolve inactive relationship.

I have two dates in Fact table One is "Closeddate" and second date is "newAccountDate".I have  created Date dimension table on the based of closed date .I have Active Relationship between "Closed dat...
  • amitchandak's avatar
    5 years ago

    Anonymous , Create measure like

    Nb Of New Accounts = 
    
    
    var  minSelectedDate = minx(ALLSELECTED(DimDate), DimDate[Date])
    return //minSelectedDate
    CALCULATE(
        DISTINCTCOUNT(Opportunity[AccountKey]), 
        FILTER(DimDate,
        DimDate[Date]>= minSelectedDate
        ),USERELATIONSHIP(Opportunity[newAccountDate],DimDate[Date]))

     

    also check I doubt dates are missing for newaccountdate