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

View all the Fabric Data Days sessions on demand. View schedule

Reply
SBR1D
Helper III
Helper III

How to ignore blank values in switch statement

Hello

 

I am using a switch statement which is working fine except for if the result if 0 where it seems to pick up blank values. I have tried adding the ISBLANK function but it does not solve  the problem. 

 

no date this month / last month / 2 months = SWITCH(
    TRUE, 'Learning Plan'[month since last activity]= 0 , "Activity in this month",
        'Learning Plan'[month since last activity] = -1 , "Activity last month",
        'Learning Plan'[month since last activity] = -2 , "Last activity two months ago",
        iSBLANK('Learning Plan'[month since last activity]), "Last compliance active learning is blank",
        "no data")
     
1 ACCEPTED SOLUTION
newtodax
Frequent Visitor

Try this and let me know if that works for you 

no date this month / last month / 2 months = SWITCH('Learning Plan'[month since last activity],
0, "Activity in this month",
-1, "Activity last month",
-2, "Last activity two months ago",
BLANK(), "Last compliance active learning is blank",
"no data")

View solution in original post

2 REPLIES 2
SBR1D
Helper III
Helper III

Thank you very much

newtodax
Frequent Visitor

Try this and let me know if that works for you 

no date this month / last month / 2 months = SWITCH('Learning Plan'[month since last activity],
0, "Activity in this month",
-1, "Activity last month",
-2, "Last activity two months ago",
BLANK(), "Last compliance active learning is blank",
"no data")

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors