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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

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
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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