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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
Anonymous
Not applicable

Filter table before using CROSSJOIN

Hi,

 

I want to create a crossjoin table of the table below with only "A" values in the "field" column. I know how to do this if I first manually filter the field. However, this is not a suitable option for me because I want to minimize the amount of tables.

 

Julkku_0-1613139129718.png

 

This is the dax formula I would use after manual filteration:

crossjoin = 
VAR _tab = 
    ADDCOLUMNS(
        CROSSJOIN(ALL('table where field filtered'[id]), ALL('table where field filtered'[category])),
        "idCategory", 'table where field filtered'[id] & 'table where field filtered'[category]
    )
RETURN
    ADDCOLUMNS(
        _tab,
            "isyes",
                VAR _val =
                    LOOKUPVALUE('table where field filtered'[value], 'table where field filtered'[id_category], [idCategory])
                RETURN
                    IF(_val = BLANK(), 0, _val)
    )​

 

 

So my questions are:

1. Is it possible to filter the "value" column in the dax formula above?

2. Is there a way to a way to do the whole process in a measure instead of creating a new table?

 

You can find the pbix here.

 

I'm very grateful for everyone who have the time to help 🙂

 

Juls

2 REPLIES 2
amitchandak
Super User
Super User

@Anonymous , what is the expected output table, is not very clear. Please share an example

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
Anonymous
Not applicable

@amitchandak 

 

Here's the expected output table. In this example I have filtered "field" A in query editor before creating the new table using crossjoin. My goal is to find a way to keep the original table untouched and do the "field" filtration in dax when creating the new crossjoined table.

Julkku_0-1613319375633.png

 

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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