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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
sleekpeek
Regular Visitor

Count Blank Values with Others in Measure

I have the query below. For segment, I need to count 2 values (value 1 and value 2) plus any blank values into the query.   Can I do this?
 
[i've amended the table and field values below to generic ones]
 
CALCULATE(SUM(Opp[ARR]), FILTER(Opp, Opp[StageName] IN { "3", "4}), FILTER(Account, Account[Segment] IN { "value1", "value2"}),USERELATIONSHIP(date[Date])) etc
 
Thanks
6 REPLIES 6
smpa01
Super User
Super User

@sleekpeek  Can you try the following

 

CALCULATE(SUM(Opp[ARR]), FILTER(Opp, Opp[StageName] IN { "3", "4}), FILTER(Account, Account[Segment] IN { "value1", "value2", BLANK()}),USERELATIONSHIP(date[Date]))

 

Did I answer your question? Mark my post as a solution!
Proud to be a Super User!
My custom visualization projects
Plotting Live Sound: Viz1
Beautiful News:Viz1, Viz2, Viz3
Visual Capitalist: Working Hrs
amitchandak
Super User
Super User

@sleekpeek , try like

 

CALCULATE(SUM(Opp[ARR]), FILTER(Opp, Opp[StageName] IN { "3", "4}), FILTER(Account, ( Account[Segment] IN { "value1", "value2"}  || isblank(Account[Segment])   ) ),USERELATIONSHIP(date[Date]))

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

sleekpeek_0-1632756715162.png

I tried, and get this error

when I add in BLANK() the query accepts it, however the values do not change and i'm missing a considerable amount 🙂 I've checked my visual, page and all pages filters and i'm not filtering anywhere to exclude these blanks.

 

when exporting, it looks like this:

sleekpeek_1-1632758802485.png

The segment field references the field to the left ... should I add something to the segment field instead?

 

sleekpeek_0-1632758646840.png

any other suggestions guys .. thanks so far

@sleekpeek  is there any way you can provide a minimum reproducible example of your issue?

Did I answer your question? Mark my post as a solution!
Proud to be a Super User!
My custom visualization projects
Plotting Live Sound: Viz1
Beautiful News:Viz1, Viz2, Viz3
Visual Capitalist: Working Hrs

thanks for the suggestion, I don't think I can.  My issue stems from the owner_segment field not (a) having the values we need for a high level segment and (b) not being mandatory hence the blank fields.  The regional segment is a data group field bucketing lots of values from the owner_segment field into 3 values only, however you cannot bucket "blank" I believe.  I think my solution is to ensure that sales ops complete that field on all sales user profiles in the data source.

Helpful resources

Announcements
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!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

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