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
rvcedd
Helper I
Helper I

Pass Measure to DAX FIND function

Hi all,

 

I would like to pass a DAX Measure as a parameter to the SEARCH Function. However, this does not seem to work. Please see example below. 

 

CommunityForum.PNG

 

 

https://1drv.ms/u/s!Avv4DxzuMuq2kckFD3Xai4HIo3qk0w?e=KPgzPs

 

I would have expected that the output of the table is as follows when FieldID = "D" is selected. Can anyone help? PowerBI attached.

 

A, 1

B, 3

C, 0 

D, 0 

 

1 ACCEPTED SOLUTION
v-gizhi-msft
Community Support
Community Support

Hi,

 

It is because calculated column can not dynamically be changed by slicer selected.

Please try this measure:

New FieldIDinWithin5Selected = FIND(SELECTEDVALUE(Sheet2[FieldID]),MAX(Sheet1[Within5]),,0)

When you select 'D' in slicer, it shows:

37.PNG

Here is the changed pbix file:

pbix 

Hope this helps.

 

Best Regards,

Giotto Zhi

View solution in original post

3 REPLIES 3
Soumyaranjan15
Regular Visitor

I have a measure that calculates this value based on the row. I have concatenated the value and its change %. How can I apply color on the result as if the value contain "-" then make the value red, if + then  green

Soumyaranjan15_0-1652179725813.png

 

Thanks for your help

 

v-gizhi-msft
Community Support
Community Support

Hi,

 

It is because calculated column can not dynamically be changed by slicer selected.

Please try this measure:

New FieldIDinWithin5Selected = FIND(SELECTEDVALUE(Sheet2[FieldID]),MAX(Sheet1[Within5]),,0)

When you select 'D' in slicer, it shows:

37.PNG

Here is the changed pbix file:

pbix 

Hope this helps.

 

Best Regards,

Giotto Zhi

amitchandak
Super User
Super User

Can not access data error

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

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.