Forum Discussion

Asheesh's avatar
Asheesh
New Member
3 years ago
Solved

Unable to get desired rows from parameterized function

Dear All,  I am trying to return a row/ column from a parameterized function. Having below two data models - Employee Employee Id Employee Name Salary 1001 SAM  90,00,000.00 1002 J...
  • AlB's avatar
    3 years ago

    Hi Asheesh 

    Small change to your function:

    (InputSal as number) =>
    let
    SingleRowSal = Table.SelectRows(#"SalaryGrades",each [Min Sal]<=InputSal and [Max Sal]>=InputSal),
    Source = try SingleRowSal[Grade ID]{0} otherwise null
    in
    Source

     

    Please accept the solution when done and consider giving a thumbs up if posts are helpful. 

    Contact me privately for support with any larger-scale BI needs, tutoring, etc.