Forum Discussion

Rbakker888's avatar
Rbakker888
Helper II
1 year ago
Solved

Filtering based on main company

Hi, I am building a dashboard but I have run into the following issue and maybe I am overlooking something simple but I have no idea how to do this. I have a table with my customers and in that ta...
  • sjoerdvn's avatar
    1 year ago

    So lets say we have a table dim_Debiteuren, like below,

    DebiteurId DebiteurKetenId Naam
    1 1 Big Comp
    2 1 Big Comp B2B
    3 1 Big Comp Consumers
    4 4 Small Shop
    5 5 Corner Shop

     

    We can then add a computed column, like below

    KetenNaam = 
    VAR mainId = [DebiteurKetenId] 
    RETURN CALCULATE(FIRSTNONBLANK(dim_Debiteuren[Naam],1),ALL(dim_Debiteuren),dim_Debiteuren[DebiteurId]=mainId)

    Resulting in this table: