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
Anonymous
Not applicable

Filtering data

Hi everyone!

 

Can somebody please help me with this?....

 

I have a table for Inflation by Country (Pais). An other dimension is ManagementArea (Zona-Gestión). Because of the business rules applied in the import query of sales, there is a relationship between Argentina-Amega (Zona-Gestión) and Uruguay (Pais).

 

In a report I have a matrix visual by Zona-Gestión and Pais. I'm trying to display the Inflation for Argentina-Amega witch has to be the Inflation of Argentina (Pais) but is not working. I assume that is for this relationship that I mentioned.

 

So, in my measure I tried to make a workaround for this but wihout success:

 

Inflación MTH = 
IF(
	HASONEVALUE(
		'Zona-Gestión'[IdZonaGestion]
	);
	SWITCH(
		VALUES(
			'Zona-Gestión'[IdZonaGestion]
		);
		"CEA-ROW";
		'Inflación País'[Inflación CEAM MTH];
		"CEA-LET";
		'Inflación País'[Inflación CEAM MTH];
		"CEA-ROE";
		'Inflación País'[Inflación CEAM MTH];
		"ARG-AMG";
		CALCULATE(
			'Inflación País'[Inflación País MTH];
			FILTER(
				'País';
				'País'[IdPais] = "ARG"
			)
		);
		"DOM-ROW";
		CALCULATE(
			'Inflación País'[Inflación País MTH];
			FILTER(
				'País';
				'País'[IdPais] = "DOM"
			)
		);
		"DOM-ROE";
		CALCULATE(
			'Inflación País'[Inflación País MTH];
			FILTER(
				'País';
				'País'[IdPais] = "DOM"
			)
		);
		"DOM-ROE (Cuba)";
		CALCULATE(
			'Inflación País'[Inflación País MTH];
			FILTER(
				'País';
				'País'[IdPais] = "DOM"
			)
		);
		'Inflación País'[Inflación País MTH]
	)
)
Inflación País MTH = 
CALCULATE(
	SUM(
		'Inflación País'[Inflacion MTH]
	);
	LASTDATE(
		'Inflación País'[Fecha]
	);
	USERELATIONSHIP(
		'Inflación País'[IdPais];
		'País'[IdPais]
	)
)

The result for this is:

Sin título.png

 

As you can see, for Argentina-Amega I have a blank value. If a delete the applied condition in the measure, I get the Inflation of Uruguay (Pais) for Argentina-Amega.

 

Any help will be much appreciated.

 

Thanks in advance.

2 REPLIES 2
v-sihou-msft
Microsoft Employee
Microsoft Employee

@Anonymous

 

Based on your screenshot, your Country and Management Area have no "direct" relationship since one country can exist in multiple Management Area. So that "relationship" between "Country" and " Management Area" should be described in your fact table (Inflation table).

 

In this scenario, I think you should make the relationships "Country->Inflation" and "ManagementArea->Inflation" active. Then directly slice Inflation on Count and Management Area level.

 

Regards,

Anonymous
Not applicable

Hi @v-sihou-msft. Thanks for your help.

 

There is no direct relationship of Country(Pais) and Managment Area(Zoan-Gestion). This is a many-to-many relationship. This relationship only happens because of the data in sales/facts table.

 

Inflation is a value that must be calculated by Pais. But, since te report that I have to build must be displayed by Zona-Gestion, I used a matrix value with Zona-Gestion and Pais as rows and created some measures to display it for both dimentions taking advantage of this "relationship" beteween them because of the sales table.

 

I don't realize how I could add Zona-Gestion to Inflation.

 

Let me show you the full Inflation table and model relationships:

 

Sin título2.pngSin título3.png

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.