Forum Discussion

hanuraolm's avatar
hanuraolm
Helper I
3 years ago
Solved

Disply the values btween using Text Attri

Below is a sample of data. Based on Build Column, we need to create two slicers. Whenever the user selects values from buildFrom and buildTo, the visuals should display values from all builds between...
  • Anonymous's avatar
    Anonymous
    3 years ago

    Hi hanuraolm ,

    I created a sample pbix file(see the attachment), please check if that is what you want.

    1. Create two dimension tables with the field [Build] and apply the field onto the slicers separately

    2. Create a measure as below

    Flag = 
    VAR _buildfrom =
        SELECTEDVALUE ( 'Build From'[Build] )
    VAR _buildto =
        SELECTEDVALUE ( 'Build To'[Build] )
    VAR _frombid =
        CALCULATE (
            MAX ( 'Table'[BuildID] ),
            FILTER ( ALLSELECTED ( 'Table' ), 'Table'[Build] = _buildfrom )
        )
    VAR _tobid =
        CALCULATE (
            MAX ( 'Table'[BuildID] ),
            FILTER ( ALLSELECTED ( 'Table' ), 'Table'[Build] = _buildto )
        )
    VAR _selbid =
        SELECTEDVALUE ( 'Table'[BuildID] )
    RETURN
        IF ( _selbid >= _frombid && _selbid <= _tobid, 1, 0 )

    3. Create a table visual and apply a visual-level filter with the condition(Flag is 1)

    Best Regards