This is best Fabric, Power BI, SQL and AI community event. How do we know? The last event sold out! Save €200 with code FABCMTY200.
Register nowA new Data Days event is coming soon! This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. Don't miss out.
I have a situation where I want to compare cost and revenue. My revenue number is just an aggregate, however cost has sub categories. How would you model this?
I can think of these ways.
1) Put revenue in one row and have 0s in all others
| Project | Revenue | Cost | Cost Category |
| Project A | 1000000 | 500 | Cat 1 |
| Project A | 0 | 90000 | Cat 2 |
| Project A | 0 | 8855 | Cat 3 |
| Project A | 0 | 6000 | Cat 4 |
2) Make single column for cost and revenue.
| Project | Type | Value |
| Project A | Revenue | 100000 |
| Project A | Cost Cat 1 | 500 |
| Project A | Cost Cat 2 | 90000 |
| Project A | Cost Cat 3 | 8855 |
| Project A | Cost Cat 4 | 6000 |
3) Create two fact tables one for revenue and another for cost.
In general, I have been struggling with this concept of different grains in data for a while. Any pointers on what are the best practices?
I would go for option "3) Create two fact tables one for revenue and another for cost" and have a bridge table for Project and any other fileds common to both tables.
Proud to be a Super User!
Paul on Linkedin.
Thank you for your response. Do you think I can create this using matrix visual and two fact tables?
Sure, but you will need a table with the row structure for the matrix. SImilar to this, but for rows instead of columns:
Proud to be a Super User!
Paul on Linkedin.
Have a read of https://www.daxpatterns.com/budget/ by the SQLBI guys, it should give you some ideas about working at different granularities.
Check out the May 2026 Power BI update to learn about new features.
Sign up to receive a private message when registration opens and key events begin.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
| User | Count |
|---|---|
| 31 | |
| 25 | |
| 25 | |
| 22 | |
| 14 |
| User | Count |
|---|---|
| 61 | |
| 49 | |
| 25 | |
| 20 | |
| 20 |