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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Orstenpowers
Post Patron
Post Patron

SelectedValue the right choice?

Dear all,

I hope you can help me..as I am stuck with my PBI file.

 

In several columns, called e.g. “V-No digit 23” I am looking for a specific wording “EAC”.

 

My very initial measure looks as follows, but this is not what I really need…

EAC = IF(SELECTEDVALUE(DetailedReporting[V-No digit 23])="EAC","PLEASE CHECK",”IGNORE”)

 

I would need a measure that compares

if column “V-No digit 6” or “V-No digit 7” or “V-No digit 8” or “V-No digit 9” or “V-No digit 10”…up to column “V-No. digit 32”

contains the wording “EAC”

and, if true, as return value “Please check”,

if false and none of the columns contains “EAC” the return value “Ignore”.

 

So, I neither know how to install the condition “or” nor how to search for the wording “EAC”…

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Orstenpowers , Try like

EAC = IF("EAC" in allselected(DetailedReporting[V-No digit 23]),"PLEASE CHECK",”IGNORE”)

View solution in original post

7 REPLIES 7
Orstenpowers
Post Patron
Post Patron

Hello people!
I am despairing of this measure...hopefully one of you out there can help me...


The measure that I need would

  • need to search in alll fields of Detailed Reporting being called “V-No digit”, meaning from V-No digit 1 up to V-No digit 32
  • need to ignore upper and lower case
  • need to ignore where the key word is written (left, middle, right)
  • look up for the key words from Keywords_VNo_DetRep

PBI_Comm_004.JPG

 

The measure would be perfectly fine if column "EAC" would then show "Please check" in those four lines highlighted in yellow.

 

PBI_Comm_005.JPG

 

Hopefully the explanation of my problem was comprehensible!?

 

Looking forward to reading from you I remain

 

v-rongtiep-msft
Community Support
Community Support

Hi @Orstenpowers ,

Please refer to my pbix file to see if it helps you.

Create a measure.

Measure 2=
IF (
    MAX ( DetailedReporting[V-No digit 11] ) = "EAC"
        || MAX ( DetailedReporting[V-No digit 6] ) = "EAC"
        || MAX ( DetailedReporting[V-No digit 7] ) = "EAC"
        || MAX ( DetailedReporting[V-No digit 8] ) = "EAC",
    "PLEASE CHECK",
    "IGNORE"
)

vpollymsft_0-1646706117602.png

About or:Or dax ||

About and:and dax && 

 

If I have misunderstood your meaning, please provide your pbix file without privacy information and desired output.

 

Best Regards

Community Support Team _ Polly

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

 

@v-rongtiep-msft 

Do you have any idea how to create such "perfect measure"? 

I thought about my original request and while doing so, I recognized that there is some space for improvements…

 

The perfect measure would

  • search in Detailed Reporting
  • in all fields being called “V-No digit”
  • look up for the key words below, ideally listed in a separate table, allowing me to adjust these key words case by case

 

Let’s say it should look for following words (no matter if upper and lower case or where the words stay):

EAC

Passport

Russia

 

Is my description understandable?

Dear Polly,

Thx for your proposal.

I assume your approach is looking for the exact wording "EAC"? What do I need to adjust that it also works for wording e.g. "EAC Ex"? Generally speaking, searching in the complete content and not for the exact wording?

I hope you can assist me...

amitchandak
Super User
Super User

@Orstenpowers , Try like

EAC = IF("EAC" in allselected(DetailedReporting[V-No digit 23]),"PLEASE CHECK",”IGNORE”)

Dear Amit, Thanks for your feedback on this!

 

Your formula works, which is great. 🙂
Unfortunately it only works for perfect matches. If a column would contain "bla bla EAC bla", feedback of the formula would be "IGNORE".

How do I need to adjust the formula that also my example would bring "Please check" as result?

And, the formula would not only need to search in V-No digit 23, but from V-No digit 1 up to V-No digit 32.

In MS Excel it worked as described below, but how to "translate" into Power BI???

 

=WENN(ZÄHLENWENN(Tabelle1[@[V-No digit 1]:[V-No digit 32]];"*eac*");"Please check";"Ignore")

Hope you can assist me on this!? Looking forward to reading from you I remain

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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