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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register 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! Prices go up Feb. 11th.

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

Find out what's new and trending in the Fabric community.