Forum Discussion

ThomasSan's avatar
ThomasSan
Helper IV
3 years ago
Solved

Table Filter not working when using measure

Hi everyone,

 

when I am using the following measure:

LM Change = 
SWITCH(
    TRUE(),
    ISBLANK([LM CY]) && ISBLANK([LM PY]),
    blank(),
    DIVIDE(
        [LM CY],
        [LM PY],
        ""
    )-1
)

 

I get the following table that outlines last month sales of the current year, it's corresponding sales in the previous year and the percentage change between these two figures per account:

 

 

However, when I would like to split each account sales by country by dragging it in the rows-section of the visual,

 

it says

 

 

Can anyone please help me understand and solve this error? 

 

Thank you in advance!

 

  • hi  ThomasSan

    try like:

    LM Change =
    SWITCH(
        TRUE(),
        ISBLANK([LM CY]) && ISBLANK([LM PY]),
        0,
        DIVIDE(
            [LM CY],
            [LM PY],
            0
        )-1
    )

     

3 Replies

  • hi  ThomasSan

    try like:

    LM Change =
    SWITCH(
        TRUE(),
        ISBLANK([LM CY]) && ISBLANK([LM PY]),
        0,
        DIVIDE(
            [LM CY],
            [LM PY],
            0
        )-1
    )

     

    • FreemanZ's avatar
      FreemanZ
      Super User

      i guess it is because BLANK() or "" is text, which could not be converted to numaric values.