Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code FABINSIDER for a $400 discount.
Register nowGet inspired! Check out the entries from the Power BI DataViz World Championships preliminary rounds and give kudos to your favorites. View the vizzies.
Hello, I have two tables that I want to relate. The two tables have the same fields but one is for incomes and the other is for expenses correponding to the same year. I would like to relate the two tables so that when I hit quarter in the income table, for instance, I automatically see the correponding Q filtered in the expenses table.
How can I do that? If I want to create the relationship using the date field, PBI says that I need a unique field. Should I have to build an intermediate table to link them?
Thanks in advance.
I would recommend to append both tables instead. But before you do that, add a column called "Source" to your income table with "income" and the same with "expense" for your expenses table.
That way you just have one date-column and both values will be filters simultaneously.
Drag the field "Source" into your report in order to distinguish between both values.
Imke Feldmann (The BIccountant)
If you liked my solution, please give it a thumbs up. And if I did answer your question, please mark this post as a solution. Thanks!
How to integrate M-code into your solution -- How to get your questions answered quickly -- How to provide sample data -- Check out more PBI- learning resources here -- Performance Tipps for M-queries
Otherwise you would have to create a calendar/date-table to combine both tables on its date-field.
Imke Feldmann (The BIccountant)
If you liked my solution, please give it a thumbs up. And if I did answer your question, please mark this post as a solution. Thanks!
How to integrate M-code into your solution -- How to get your questions answered quickly -- How to provide sample data -- Check out more PBI- learning resources here -- Performance Tipps for M-queries
Hello, I have two tables that I want to relate. The two tables have the same fields but one is for incomes and the other is for expenses correponding to the same year. I would like to relate the two tables so that when I hit quarter in the income table, for instance, I automatically see the correponding Q filtered in the expenses table.
How can I do that? If I want to create the relationship using the date field, PBI says that I need a unique field. Should I have to build an intermediate table to link them?
Thanks in advance.
Hi @aitorcalero,
You can create a calendar table following the instructions in this blog, then create relationships between tables as ImkeF's post, you can check the example as follows.
After that, you can create visuals using date field from calendar table and related fields from income and expenses table, then filter the visual from quarter slicer.
For more deatils, you can review the example in the attached PBIX file.
Thanks,
Lydia Zhang
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code FABINSIDER for a $400 discount!
Check out the February 2025 Power BI update to learn about new features.
User | Count |
---|---|
89 | |
82 | |
65 | |
51 | |
31 |
User | Count |
---|---|
119 | |
113 | |
71 | |
64 | |
46 |