cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Syndicate_Admin
Administrator
Administrator

Differentiated filter in several tables

Hello, please your help to the following query:

I am consolidating in a new table the unique values of different tables and I need to place a filter to one of these tables to extract the data that matches the text "RESERVE"

Attached code and image of my DAX query.

CONSOLIDATES * to 1 =
FILTER(DISTINCT(UNION(
VALUES('Purchases V2'[NEED*]),
VALUES('SQVI_LIB01'[ID_UNICO]), *** HERE I NEED TO APPLY A FILTER TO EXTRACT THE ID_UNICOS THAT HAVE THE TEXT "RESERVATION" FROM ANOTHER COLUMN *** "
VALUES(SE16N[NEED*]))),
[NEED*]<>BLANK())

JMOLLAN_1-1671816932149.png

1 ACCEPTED SOLUTION
AlB
Super User
Super User

You have not specified the name of the "other column" that will be used for the filtering

 

CONSOLIDATES * to 1 =
FILTER (
    DISTINCT (
        UNION (
            VALUES ( 'Purchases V2'[NEED*] ),
            CALCULATETABLE (
                VALUES ( 'SQVI_LIB01'[ID_UNICO] ),
                'SQVI_LIB01'[The_OTHER_COLUMN] = "RESERVATION"
            ),
            VALUES ( SE16N[NEED*] )
        )
    ),
    [NEED*] <> BLANK ()
)

 

SU18_powerbi_badge

Please accept the solution when done and consider giving a thumbs up if posts are helpful. 

Contact me privately for support with any larger-scale BI needs, tutoring, etc.

 

 

View solution in original post

3 REPLIES 3
Syndicate_Admin
Administrator
Administrator

Thank you very much, the issue is solved.

Then please mark the answer as the solution and give kudos if suitable

 

SU18_powerbi_badge

Please accept the solution when done and consider giving a thumbs up if posts are helpful. 

Contact me privately for support with any larger-scale BI needs, tutoring, etc.

 

AlB
Super User
Super User

You have not specified the name of the "other column" that will be used for the filtering

 

CONSOLIDATES * to 1 =
FILTER (
    DISTINCT (
        UNION (
            VALUES ( 'Purchases V2'[NEED*] ),
            CALCULATETABLE (
                VALUES ( 'SQVI_LIB01'[ID_UNICO] ),
                'SQVI_LIB01'[The_OTHER_COLUMN] = "RESERVATION"
            ),
            VALUES ( SE16N[NEED*] )
        )
    ),
    [NEED*] <> BLANK ()
)

 

SU18_powerbi_badge

Please accept the solution when done and consider giving a thumbs up if posts are helpful. 

Contact me privately for support with any larger-scale BI needs, tutoring, etc.

 

 

Helpful resources

Announcements
Exciting changes

Power BI Community Changes

Check out the changes to the Power BI Community announced at Build.

May 2023 update

Power BI May 2023 Update

Find out more about the May 2023 update.

Kudo Data Story carousel

Data Stories Gallery

Visit our Data Stories Gallery and give kudos to your favorite Data Stories.

Top Solution Authors