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! Request now

Reply
harinik1989
Frequent Visitor

I need a list of records instead of the count of records.

Hi all,

 

I would like some help in this topic please.  I have created a measure called number of ids excluded, which will calculate the count of the ids excluded from the data based on certain conditions. please find the formula for the measure below:


No of ids excluded = CALCULATE(COUNT('table B'[column_id]),FILTER('table A',OR('table A'[column A]=1||'table A'[column B]=0,'table A'[column C]=1||'table A'[column D]=BLANK())),FILTER('table B','table B'[St_flag]=0))


These are the conditions as per the requirement. If either column A or col B or col c from table A satisfies and st_flag from table B is 0 then include the id in the count.
Now I want to see what are the ids that have been excluded. How can I achieve this. I tried calculatetable but it takes only one condition from only 1 table.
Please suggest some ideas how can i achieve this. Instead of the count, I want to see the list of ids excluded.
Also st_flag is a calculated column in the table B while the rest of the columns are from the DB.

1 ACCEPTED SOLUTION

HI, @harinik1989 

You need add another filter measure and apply this measure to the  visual filter pane of TableB.

filter =
IF (
    OR (
        MAX ( 'Table A'[columnA] ) = 1
            || MAX ( 'Table A'[columnB] ) = 0,
        MAX ( 'Table A'[columnC] ) = 1
            || MAX ( 'Table A'[columnD] ) = BLANK ()
    )
        && MAX ( 'Table B'[St_flag] ) = 0,
    0,
    1
)

veasonfmsft_0-1666160857366.png

Best Regards,
Community Support Team _ Eason

View solution in original post

3 REPLIES 3
harinik1989
Frequent Visitor

Table A    
idcolumn Acolumn Bcolumn Ccolumn D
0001A0101
0000A100 
1111A1002
1110A0004
     
     
     
Table B    
id Column AColumn BSt_flag 
0001A001 
0000A110 
1111A100 
1110A111 
     
     
     
Expected Result   
     
idSt_flag   
     
0000A0   
1111A0   
1110A1   
     

 

Here is the sample data and expected result as I cannot share the screenshot of actual data. Hope this helps. Basically i need the ids themselves ( or the rows from the table B) which have been excluded instead of just the number of ids (or number of rows from table B). Hope this helps. Any suggestions welcome. 

HI, @harinik1989 

You need add another filter measure and apply this measure to the  visual filter pane of TableB.

filter =
IF (
    OR (
        MAX ( 'Table A'[columnA] ) = 1
            || MAX ( 'Table A'[columnB] ) = 0,
        MAX ( 'Table A'[columnC] ) = 1
            || MAX ( 'Table A'[columnD] ) = BLANK ()
    )
        && MAX ( 'Table B'[St_flag] ) = 0,
    0,
    1
)

veasonfmsft_0-1666160857366.png

Best Regards,
Community Support Team _ Eason

mangaus1111
Solution Sage
Solution Sage

Hi @harinik1989 , please send screenshots of samples table A and B and your expected result.

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