Fx Power Bi Function to band sensitive information and prevent upload in Power Bi

PHOTO EMBED

Thu Aug 05 2021 22:08:12 GMT+0000 (UTC)

Saved by @Darkleech

(vals) =>
let ValBucket =
    {           
        {(x)=>x<15, "<15 Years"},   
        {(x)=>x<20, "15-20 Years"},
        {(x)=>x<25, "20-25 Years"},
        {(x)=>x<30, "25-30 Years"},
        {(x)=>x<35, "30-35 Years"},
        {(x)=>x<40, "35-40 Years"},
        {(x)=>x<45, "40-45 Years"},
        {(x)=>x<50, "45-50 Years"},
        {(x)=>x<55, "50-55 Years"},
        {(x)=>x<60, "55-60 Years"},
        {(x)=>x<65, "60-65 Years"},
        {(x)=>x<70, "65-70 Years"},
        {(x)=>x<75, "70-75 Years"},
        {(x)=>x<80, "75-80 Years"},
        {(x)=>x<85, "80-85 Years"},
        {(x)=>x<90, "85-90 Years"},
        {(x)=>x<95, "90-95 Years"},
        {(x)=>x<99, "95-99 Years"},
        {(x)=>x<120, "99-120 Years"},
        {(x)=>true, "Bad Data"}
    },
    Result = List.First(List.Select(ValBucket, each _{0}(vals))){1}
in
    Result
content_copyCOPY

remember to set function and then call from within a column within M Query