Forum Discussion

Sean-OReilly's avatar
Sean-OReilly
Icon for Helper IV rankHelper IV
3 years ago
Solved

Need help re Switch

Hi

Im trying to add a Column using Switch Function and when i use the below formula i get blank cells only.

What is wrong with it?

 

Resource No = SWITCH(true(), MK_Job_LedgerEntries[Type] = "Resource", MK_Job_LedgerEntries[No])
 
MK_Job_LedgerEntries[Type] only has 2 results which are "G/L Account" and "Resource" and it is a Text field.
 
  • Is this in the table 'MK_Job_LedgerEntries'? As this is effectively single condition you could use IF

    Resource No = IF(MK_Job_LedgerEntries[Type] = "Resource", MK_Job_LedgerEntries[No])

    If it's in a different table then most likely you need to use RELATED on the column references

     

2 Replies

  • Stachu's avatar
    Stachu
    Icon for Community Champion rankCommunity Champion

    Is this in the table 'MK_Job_LedgerEntries'? As this is effectively single condition you could use IF

    Resource No = IF(MK_Job_LedgerEntries[Type] = "Resource", MK_Job_LedgerEntries[No])

    If it's in a different table then most likely you need to use RELATED on the column references