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
Arooz
New Member

Measure returns true if all rows contain the same value

Hi, 

 

I would like to add a Column/Measure 'Free Entirely' which is True when the 'Type' is "Free" for all rows with the same 'Name'. 

 

I am rather new at DAX and have been stuck at this for a while. Thanks in advance!

 

I.e. if the Time Filter is set between 9 and <10, and the following table is resulted, the 'Free Entirely' column would result in true, for all Name = Name of current row

 

TimeNameTypeFree Entirely
9:00:00JohnFreeFalse
9:15:00JohnFreeFalse
9:30:00JohnBusyFalse
9:45:00JohnBusyFalse
9:00:00BobFreeTrue
9:15:00BobFreeTrue
9:30:00BobFreeTrue
9:45:00BobFreeTrue
1 ACCEPTED SOLUTION
nandukrishnavs
Community Champion
Community Champion

@Arooz 

Try this measure.

 

FreeEntirely =
VAR _selectedName =
    CALCULATE ( SELECTEDVALUE ( 'Table'[Name] ) )
VAR _countName =
    CALCULATE ( COUNT ( 'Table'[Name] ) )
VAR _countNameFree =
    CALCULATE (
        COUNT ( 'Table'[Name] ),
        FILTER ( ALL ( 'Table'[Name] ), 'Table'[Name] = _selectedName ),
        'Table'[Type] = "Free"
    )
VAR result =
    IF ( _countName = _countNameFree, TRUE (), FALSE () )
RETURN
    result

 

 

free.JPG

 

This will not work if you add the Time field into the visual.



Did I answer your question? Mark my post as a solution!
Appreciate with a kudos
🙂


Regards,
Nandu Krishna

View solution in original post

2 REPLIES 2
nandukrishnavs
Community Champion
Community Champion

@Arooz 

Try this measure.

 

FreeEntirely =
VAR _selectedName =
    CALCULATE ( SELECTEDVALUE ( 'Table'[Name] ) )
VAR _countName =
    CALCULATE ( COUNT ( 'Table'[Name] ) )
VAR _countNameFree =
    CALCULATE (
        COUNT ( 'Table'[Name] ),
        FILTER ( ALL ( 'Table'[Name] ), 'Table'[Name] = _selectedName ),
        'Table'[Type] = "Free"
    )
VAR result =
    IF ( _countName = _countNameFree, TRUE (), FALSE () )
RETURN
    result

 

 

free.JPG

 

This will not work if you add the Time field into the visual.



Did I answer your question? Mark my post as a solution!
Appreciate with a kudos
🙂


Regards,
Nandu Krishna

Worked like a charm, thanks!

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.