The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
Hello,
my model is:
as you can see i have a measure and to get proper results and sum Discount i need to filter table DateDiscountMeterId.
I do not like this design, is not efficient and adding additional daxes.
My topology is Offer, PricingModel and Region and these filelds always must be in a matrix.
So i created 2 fact tables model design like here with shared dimenstion table:
So now when i want to sum up discouny effective price i am using my topology table:
which seems fine but how to get rid of these empty row? It is comming from Fct_EA_AmortizedCosts table, there is no record with DateDiscountPlanMeterId = 5.
And second question - It is a valid approach and valid power bi design?
What are your thoughs?
Please find sample models here:
Disc Samples
Best,
Jacek
Solved! Go to Solution.
ok so what will be a difference here?
Fact_AmortizedCosts ← Bridge_DateDiscountPlan → Fact_DiscountMetrics
plus , please , do not generate this answers in chat gpt mostly. i am not buying them.
Hi @jaryszek,
Thank you for reaching out to Microsoft Fabric Community.
The issue here the unexpected blank row in the visual is because of some id's in the shared dimension table (Dim_DateDiscountPlanMeterId) do not have corresponding rows in Fct_EA_AmortizedCosts. So when the matrix visual evaluates the measure it includes unmatched dimension rows.
And for your second question, yes your approach of normalizing the model into two fact tables with a shared key is valid and follows the best practice dimensional modeling.
If this post helps in resolving the issue, then please consider Accepting as solution to help the other members find it more quickly, don't forget to give a "Kudos" – I’d truly appreciate it!
Thanks and regards,
Anjan Kumar Chippa
Hi @jaryszek,
As we haven’t heard back from you, we wanted to kindly follow up to check if the solution I have provided for the issue worked? or let us know if you need any further assistance.
Thanks and regards,
Anjan Kumar Chippa
Hey @jaryszek,
Looking at your model normalization challenge, here are my recommendations:
Root Cause Analysis:
Solution Options:
Recommendations for Improvement:
Alternative: Separate Dimensions with Role-Playing:
Keep separate date/discount dimensions
Use role-playing relationships for shared attributes
Data Model Optimization:
DAX Pattern for Clean Measures:
Total Effective Price =
VAR ValidKeys =
FILTER(
Dim_DateDiscountPlanMeterId,
NOT ISBLANK(RELATED(Fct_EA_AmortizedCosts[DateDiscountPlanMeterId]))
)
RETURN
SUMX(ValidKeys, RELATED(Fct_EA_AmortizedCosts[EffectivePrice]))
ok so what will be a difference here?
Fact_AmortizedCosts ← Bridge_DateDiscountPlan → Fact_DiscountMetrics
plus , please , do not generate this answers in chat gpt mostly. i am not buying them.