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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
digomattos
New Member

Filter is not working properly

Hello!

I'm trying to use the measure Indicador1 in a CALCULATE formula to filter another measure.

Indicador1 =
Index(1,VALUES(NotasPilares[Meta]))

This measure returns the first line of a table with distinct values of NotasPilares[Meta]. This value is dynamic depending on filters that are applied on slicers.

The second measure is:
%R_I1 = CALCULATE(SUM(NotasPilares[% Realizado_NOTA]),
FILTER(NotasPilares, NotasPilares[Meta] = [Indicador1]))

The bold expression is not working properly. The result I get is the same for
SUM(NotasPilares[% Realizado_NOTA])
the filter expression is being completely ignored. 

When I create a card and insert the Indicador1, I can see a text value (Let's suppose its value is "Example Text 1"). 
If I write manually the raw value that I see for Indicador1, it works normally.

For instance:
%R_I1 = CALCULATE(SUM(NotasPilares[% Realizado_NOTA]),
FILTER(NotasPilares, NotasPilares[Meta] = "Example Text 1"]))
This expression works perfectly. 

So, how can I use Indicador1 to filter the measure %R_I1 properly?
I believe that the CALCULATE formula is correct, but probably the Indicador1 needs to be converted to a scalar value. But I don't know how to do it.

1 REPLY 1
Ashish_Mathur
Super User
Super User

Hi,

Share some data, describe the question and show the expected result.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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