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

The Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.

Reply
Mercovito
Frequent Visitor

Calculated Table with custom filtering

Hello Masters

I am trying to filter my table with DAX and create a new table.

I want to exclude companies from the main table those all factories are Inactive. Below picture; "Company C" should be excluded as all factories of Company C is Inactive. So new table will only have Company A, B and C

Can you please help?

Here, you can see the PBIX file.

https://drive.google.com/file/d/1zxp-Ln_e3Mzmzkefe68h5OWO76kQY2EH/view?usp=sharing

 

Mercovito_0-1698216751271.png

 

1 ACCEPTED SOLUTION
FreemanZ
Super User
Super User

hi @Mercovito ,

Not sure if i fully get you, try to create a calculated table like:

Table = 
CALCULATETABLE(
    sheet1,
    FILTER(
        VALUES(sheet1[Company]),
        "Active" IN  CALCULATETABLE(VALUES(sheet1[Factory Active - Inactive]))
    )
)

it worked like:

FreemanZ_0-1698221832040.png

 

View solution in original post

4 REPLIES 4
ThxAlot
Super User
Super User

 

Table =
FILTER(
    DISTINCT( Sheet1[Company] ),
    NOT ISEMPTY(
        CALCULATETABLE( Sheet1, Sheet1[Factory Active - Inactive] = "Active" )
    )
)

 

ThxAlot_1-1698224719057.png



Expertise = List.Accumulate(


        {Days as from Today},


        {Skills and Knowledge},


        (Current, Everyday) => Current & Day.LeanAndPractise(Everyday)


)



@MathXTC Thx A LOT

FreemanZ
Super User
Super User

hi @Mercovito ,

Not sure if i fully get you, try to create a calculated table like:

Table = 
CALCULATETABLE(
    sheet1,
    FILTER(
        VALUES(sheet1[Company]),
        "Active" IN  CALCULATETABLE(VALUES(sheet1[Factory Active - Inactive]))
    )
)

it worked like:

FreemanZ_0-1698221832040.png

 

Thank you so much; I need to burn my brain to understand this step by step 🙂

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Feb2025 Sticker Challenge

Join our Community Sticker Challenge 2025

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

Feb2025 NL Carousel

Fabric Community Update - February 2025

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