Forum Discussion
Two fact table with different granularities and star model
Hello π
I am facing an issue on my PBI datamodel.
I have a star-model with 2 fact tables that are linked to the same dimensions
Fact 1 -> Dim A / Dim B / Dim C
Fact 2 -> Dim A / Dim B / Dim C / Dim D
Fact 1 & 2 are EXACTLY the same except that Fact 2 has two additional columns that increase the volume (list of contracts) that are stored in a specific Dim D
Initially the goal was to build only one model on Fact 2 + all dimensions but since the volume is huge the performances are not very good (I work in Direct Query to an Oracle DB).
I was thinking of something like this :
- keeping the 2 models
- when the visuals are not using Dim D then use the measure built on Fact 1
- if a visual using Dim D is used then use the measure built on Fact 2
This way we will keep good performance for all reports except the ones using Dim D (that's OK).
Any way I can achieve this ?
My idea was to create two measures (Meas_Fact_1 and Meas_Fact_2) and then Meas_Fact_3 that will call either Meas_Fact_1 or Meas_Fact_2 depending on Dim D... but I can't figure it out π
Thanks for your help
1 Reply
- audreygerred
Super User
Hi! You can try to set up an aggregate table so that as much as possible hits the cache of the import: User-defined aggregations - Power BI | Microsoft Learn