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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
xiumi_hou
Post Partisan
Post Partisan

Need help for dax dunction to count filter

Dear all,

 

I have a dax function like below. And I have a sclier to filter each person.

 

1st outreach outbound =
VAR BaseLineBaseDate = MIN(Calls[date_start])
VAR BaseLineBaseValue = CALCULATE( SELECTEDVALUE(Calls[Calls_cstm.channel_c]),FILTER(Calls,Calls[date_start]=BaseLineBaseDate && Calls[direction]="Outbound" ))
return BaseLineBaseValue
 
The problem is, most of the people, it can give the result, there are some gave blank result but it does exist. Is there anything wrong with my dax function? I want to filter out is first outreach type... So I am finding the first outreach date and then look for the corresponding value.
 
Thanks!
1 ACCEPTED SOLUTION
Anonymous
Not applicable

HI @xiumi_hou ,

I  think it should more be related to selectedvalue function, it will return blank when it returns multiple results, you can try to follow measure formula if it works: 

1st outreach outbound =
VAR BaseLineBaseDate =
    MIN ( Calls[date_start] )
RETURN
    CALCULATE (
        SELECTEDVALUE (
            Calls[Calls_cstm.channel_c],
            CONCATENATEX (
                VALUES ( Calls[Calls_cstm.channel_c] ),
                [Calls_cstm.channel_c],
                ","
            )
        ),
        FILTER (
            Calls,
            Calls[date_start] = BaseLineBaseDate
                && Calls[direction] = "Outbound"
        )
    )

Regards,

Xiaoxin Sheng

View solution in original post

7 REPLIES 7
Anonymous
Not applicable

HI @xiumi_hou ,

I  think it should more be related to selectedvalue function, it will return blank when it returns multiple results, you can try to follow measure formula if it works: 

1st outreach outbound =
VAR BaseLineBaseDate =
    MIN ( Calls[date_start] )
RETURN
    CALCULATE (
        SELECTEDVALUE (
            Calls[Calls_cstm.channel_c],
            CONCATENATEX (
                VALUES ( Calls[Calls_cstm.channel_c] ),
                [Calls_cstm.channel_c],
                ","
            )
        ),
        FILTER (
            Calls,
            Calls[date_start] = BaseLineBaseDate
                && Calls[direction] = "Outbound"
        )
    )

Regards,

Xiaoxin Sheng

xiumi_hou
Post Partisan
Post Partisan

UP

Anonymous
Not applicable

Hi

 

I wonder if your issue is related to the "blank" record created by Power BI when you are relating two tables and the one or many values for the relevant field is not found on one of the tables.

example

table 1

Name_numberName
1paul
2john
3Juan
4Tomas
5Ivan

 

table 2

Product CountName_number
101
23
610
68

 

Final report

Product countName
10paul
2Juan
12blank

 

Is this your issue?

 

Thank you

Tomas

 

@Anonymous  Thanks for answering. Yes, I do can not found some records. But the records do exit in my database...

Anonymous
Not applicable

Can you share some sample of when it is not working?

Tomas

 

I got the issue. The issue is For example, I have two records for the same person same date

Example,

Person 1     July, 18  3:00pm         outreach=email

Person 1    July, 18 3:00 pm         outreach =phone 

Persno 1  August, 1st, 8:00 pm   outreach=email

 

If the stituation is like above, the first outreach is at same day, same time, How can I get out the data? 

@Anonymous 

UP

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

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.