Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get certified in Microsoft Fabric—for free! For a limited time, the Microsoft Fabric Community team will be offering free DP-600 exam vouchers. Prepare now

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
)

 

Helpful resources

Announcements
OCT PBI Update Carousel

Power BI Monthly Update - October 2024

Check out the October 2024 Power BI update to learn about new features.

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

October NL Carousel

Fabric Community Update - October 2024

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