Forum Discussion
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 received for every time.
These two tables were given with inactive relationship due to restrictions of having common tables. Now I have a date slicer connected to Date table and another chart which as having time in x axis number of orders received in y axis.
Now to make my chart to get filtered when changing the values in my date slicer. As I said, I have only inactive relationship.
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.
2 Replies
- AllisonKennedy
Community Champion
You will need to create a measure, such as:
OrdersByDate = CALCULATE(DISTINCTCount(Orders[orderID]) , USERELATIONSHIP( Orders[date], Date[Date])) - V-lianl-msft
Community Support
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.