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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
Titatovenaar2
Helper III
Helper III

Field unrecognized in FILTER from SQL Table, but Manual Data does work (black measure)

 

Hi guys,

 

I have a table with employees numbers extracted from SQL, and I have their employees numbers extracted via the USERNAME() functionality and a measure (see below). Based on that I want to show certain things on the page and leave other things out, which works all find with the manual data in a local created file. On the server where I have to implement it, however, it doesn't work.

 

First I select a username via 'View as roles > Other user'.

Titatovenaar2_0-1624888773183.png

As you can see 55892 is the number of the employee that I will extract via the following measure:

 

Medewerkernummer = 
LEFT(USERNAME(),(FIND("@",USERNAME(),1,1)-1)) 
--dutch for EmployeeNumber

 

 

In the following manual data table, you will see that it recognizes the 'Medewerkernummer' measure output with column 'mail' with the following measure.

Titatovenaar2_2-1624889171369.png

Titatovenaar2_6-1624889631186.png

 

 

However, with the actual data from another table that I import via SQL, it doesn't work.

The measure that I use for this is the following and exactly the same, also based on columns with the same data types:

Titatovenaar2_3-1624889248418.png

What I notice here, is that the measure code color does not turn purple, it is actually black!

 

Here the proof of the exact same datatypes of both columns:

PortaalView[MedewerkerNummer]: --employee number in dutch

Titatovenaar2_4-1624889370357.png

test[mail]: --eventhough it's called mail, I've also manually typed in the employee numbers in this column.

Titatovenaar2_5-1624889398501.png

 

Also, there are no spaces that need to be trimmed. It simply doesn't recognize it in one table, but it does in the other.

The only difference I can find is the fact that the measure does not turn purple, but remains black.

 

I also tried loading a different table from SQL, there it also keeps the measure black colored.

 

Any ideas what I can do to make it recognizable?

 

Unfortunately, I cannot include a .pbix file, because this is security sensitive data and the whole problem is that manual data doesn't have this problem. So I can't easily recreate this scenario.

 

Kind regards,

Igor

1 ACCEPTED SOLUTION
HotChilli
Super User
Super User

Can you start by changing the name of the measure so it's not the same as the column? (more different than just case)

Let's see if that makes any difference.

View solution in original post

2 REPLIES 2
HotChilli
Super User
Super User

Can you start by changing the name of the measure so it's not the same as the column? (more different than just case)

Let's see if that makes any difference.

It worked, thanks!

So even though when you select the measure with the same name as the column, it will refer to the column nonetheless if there's a column within the same table you are filtering. Good to know!

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel

Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.