Reply
ThomasSan
Helper IV
Helper IV

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:

 

ThomasSan_0-1678348460100.png

 

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

ThomasSan_2-1678348797476.png

 

it says

 

ThomasSan_1-1678348605795.png

 

Can anyone please help me understand and solve this error? 

 

Thank you in advance!

 

1 ACCEPTED SOLUTION
FreemanZ
Super User
Super User

hi  @ThomasSan

try like:

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

 

View solution in original post

3 REPLIES 3
ThomasSan
Helper IV
Helper IV

Cool, that worked! Thanks a lot!

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

FreemanZ
Super User
Super User

hi  @ThomasSan

try like:

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

 

avatar user

Helpful resources

Announcements
March PBI video - carousel

Power BI Monthly Update - March 2025

Check out the March 2025 Power BI update to learn about new features.

March2025 Carousel

Fabric Community Update - March 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors (Last Month)
Top Kudoed Authors (Last Month)