Forum Discussion

Mechi's avatar
Mechi
Helper I
6 years ago
Solved

Find Value in one table with Text field in another table with Filters

Hello All,    I need your help to find a solution for the  below query in M code    Master Number T1 T2 T3 Y/N RESULT 5645 X   X Y X 3241   X X Y   7592       ...
  • Mechi's avatar
    Mechi
    6 years ago

    Hello Anonymous , Anonymous ,

     

    Thank you guys for your  good support in sharing the knowledge with your codes ðŸ˜Š

     

    I had slightly refined the codes from your inputs and finally cracked it with simple code

     

    ref. snap

     

    Updated Code:-

     

    let fresult
    = if ([#"Y/N"] = "Y") then
    let result = if
    (Table.RowCount(Table.SelectRows
    (Table.FindText(#"Issue",[Number]),
    each [STATUS] = "OPEN" and
    [CATEGORY] = "SWEET" and
    Text.Contains([TYPE], "CAKE")))) > 0 then "X" else ""
    in result
    else ""

    in fresult

     

    - Converted the Number format to Text format inside Edit Queries

    - I had started filtering with Y/N values and then counted the table rows based on the filters of OPEN, SWEET, CAKE

    - Finally if the count was more than Zero, then i had published my results as "X" 

     

    BR

    Mechi ðŸ”§