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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

Dax measure using table and columns

Hi everyone,

I'm making a measure to summarize it into a matrix table. 

 

The measure that I want to do is to create the fourth column (Attending result) that shows a message "present" if one letter from column A has code as Control and other codes (A1, A5...) from column B and the same package from column C; and I would show also "no present" if one letter from column A has only code as Control from column B and the same package from column C.           

Column A and B are from the same table (Table 1) and column C is from (Table 2).            

In column  we have the same package for this example but it can changes.

 

Thank you for your response. Best regards. 

      

89456.PNG

 

1 ACCEPTED SOLUTION
Mariusz
Community Champion
Community Champion

Hi @Anonymous 

 

Try the below.

 

Measure = 
VAR _tbl = ALLEXCEPT( 'Table', 'Table'[Column A], 'Table'[Column C] )
VAR _isControl = 
    CALCULATE( 
        COUNTROWS( 'Table' ), 
        'Table'[Column B] = "Control",
        _tbl 
    ) > 0
VAR _isNotControl = 
    CALCULATE( 
        COUNTROWS( 'Table' ), 
        NOT 'Table'[Column B] = "Control",
        _tbl 
    ) > 0
RETURN IF( _isNotControl && _isControl, "Present", "Not present" )

 

Best Regards,
Mariusz

If this post helps, then please consider Accepting it as the solution.

Please feel free to connect with me.
Mariusz Repczynski

 

View solution in original post

1 REPLY 1
Mariusz
Community Champion
Community Champion

Hi @Anonymous 

 

Try the below.

 

Measure = 
VAR _tbl = ALLEXCEPT( 'Table', 'Table'[Column A], 'Table'[Column C] )
VAR _isControl = 
    CALCULATE( 
        COUNTROWS( 'Table' ), 
        'Table'[Column B] = "Control",
        _tbl 
    ) > 0
VAR _isNotControl = 
    CALCULATE( 
        COUNTROWS( 'Table' ), 
        NOT 'Table'[Column B] = "Control",
        _tbl 
    ) > 0
RETURN IF( _isNotControl && _isControl, "Present", "Not present" )

 

Best Regards,
Mariusz

If this post helps, then please consider Accepting it as the solution.

Please feel free to connect with me.
Mariusz Repczynski

 

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

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!

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.