Don't miss your chance to take the Fabric Data Engineer (DP-600) exam for FREE! Find out how by attending the DP-600 session on April 23rd (pacific time), live or on-demand.
Learn moreNext up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now
Hi
Link to the file is Here.
I have 3 Tables
Orders - Order Related Details with Unique Column, OrderID, OrderDate, ... and so on.
Returns - Contains a single column, ReturnID which contains OrderID that were returned.
Expenses - It contains 2 columns, Expense Date and the Expense Amount.
This Expenses Table is niether related to Orders and nor to Returns as the expenses are of different dates.
Now what I want is to create Matrix Table in which I want to show Sold Amount from Orders Table, Returned Amount from Return & Orders Table and Expense for that Month from Expenses Table.
In my actual Data I have created relationships in Orders and Returns to get related info.
These tables have no relationship to Expenses Table and I want to create a relationship based on Month and Year so that I could pull the Expenses into the same row in the Matrix Table.
But relationship is not working in my actual Data, so is there a way to get the Expense Amount for the Month into the Table or to recreate some kind of relationship.
NOTE:-Keep that in mind that Relationship in this Data is working but not working in my actual data due to multiple relationships and duplicate OrderID's and ReturnID's so I have inactive the relationships and even if I active them then I am getting blank results.
Solved! Go to Solution.
HI @iamprajot,
I think you need to write a formula to manually get available order date range in summary row contents, then find out matched Expenses records.
Sample formula:
Total Expense =
VAR _valid =
MINX ( VALUES ( Orders[OrderDate] ), [OrderDate] )
RETURN
IF (
_valid <> BLANK (),
CALCULATE (
SUM ( Expenses[Expense] ),
FILTER (
ALL ( Expenses ),
[ExpenseDate]
IN CALENDAR (
DATE ( YEAR ( _valid ), MONTH ( _valid ), 1 ),
DATE ( YEAR ( _valid ), MONTH ( _valid ) + 1, 1 )
- 1
)
)
)
+ 0
)
Regards,
Xiaoxin Sheng
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 44 | |
| 43 | |
| 38 | |
| 18 | |
| 15 |
| User | Count |
|---|---|
| 67 | |
| 63 | |
| 30 | |
| 30 | |
| 23 |