Forum Discussion
Rbakker888
1 year agoHelper II
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...
- 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:
sjoerdvn
1 year agoSolution Sage
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:
- Rbakker8881 year agoHelper II
This worked perfectly, thank you both for your help!