Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

InActive Relationship in Power BI

I have many tables in my report out of which two tables are used in a chart. One is Date table which contains the date and another is order table which contains the Date, Time and number of orders re...
  • V-lianl-msft's avatar
    5 years ago

    Hi Anonymous ,

     

    Try:

    Orders=
    CALCULATE(
        SUM(Sales[sales])
        ,USERELATIONSHIP('Date'[Date], Sales[ShipDate])
    )

    Or:

    Orders=
    CALCULATE(
        SUM(Sales[sales])
        ,FILTER(Sales, Sales[ShipDate] in VALUES('Date'[Date]))
    )
    
    or
    
    Orders= IF(MAX(Sales[ShipDate]) in VALUES('Date'[Date]),
        SUM(Sales[sales]))
       

     

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