Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now

Reply
tvaishnav
Helper IV
Helper IV

How do model data with different granularity?

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 

 

ProjectRevenue CostCost Category
Project A1000000500Cat 1
Project A090000Cat 2
Project A08855Cat 3
Project A06000Cat 4

 

2) Make single column for cost and revenue.

 

ProjectTypeValue
Project ARevenue100000
Project ACost Cat 1500
Project ACost Cat 290000
Project ACost Cat 38855
Project ACost Cat 46000

 

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? 

 

 

4 REPLIES 4
PaulDBrown
Community Champion
Community Champion

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.





Did I answer your question? Mark my post as a solution!
In doing so, you are also helping me. Thank you!

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?

 

ud.PNG

 

Sure, but you will need a table with the row structure for the matrix. SImilar to this, but for rows instead of columns:

Custom Matrix 





Did I answer your question? Mark my post as a solution!
In doing so, you are also helping me. Thank you!

Proud to be a Super User!
Paul on Linkedin.






johnt75
Super User
Super User

Have a read of https://www.daxpatterns.com/budget/ by the SQLBI guys, it should give you some ideas about working at different granularities.

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.