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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
JānisB
Frequent Visitor

How to change Relationship within one Measure

I have dimension table dim_Account_Resource_CostItem (picture 1)

JnisB_0-1717992121479.png

 

 


I have fact table Budget (picture 2)

JnisB_1-1717992131874.png

 


The realtionship between these tables (picture 3)

JnisB_2-1717992139881.png

 


I have a Matrix report (picture 4)
Rows:
1.Resource
2.CostItem

JnisB_3-1717992149042.png

 


The report uses measure Budget CP:

 

 

Budget CP = 
    SWITCH(TRUE(),
    ISINSCOPE(dim_Account_Resource_CostItem[Account_ID]), BLANK(),
    SUM('Budget'[Value])
    )

 

 



The problem is that for Resources "Laboratory", "Tractors" and "Water" it shows one value 600 summarized by CostItem not separated by Resources.

It's understandable why.
The question is - how to change the measure Budget CP or how to make additional changes to get the result -
If Resource in ("CostOfMaterial", "CostOfServices") then use relationship by ItemCost, but if Resource in ("Laboratory", "Tractors", "Water") then use use relationship by Resource between dim_Account_Resource_CostItem table and Budget table?

The result should be:

JnisB_4-1717992184793.png

 

Link to pbix file 'Razosana_v3.0_MODEL - EXAMPLE.pbix' for download:

https://failiem.lv/u/u679acqvrr 

2 REPLIES 2
Rupak_bi
Post Prodigy
Post Prodigy

plz share sample data



Regards
Rupak
FOLLOW ME : https://www.linkedin.com/in/rupaksar/

The link to example pbix file in the main topic.

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.