Forum Discussion

InsightSeeker's avatar
InsightSeeker
Helper III
2 years ago
Solved

Need help with measure

I have got tables through between which I need to create a measure to get the desired results.   Conditional Logic: The IF statement checks if: Table 1 Customer equals Table 2 Customer Table 1...
  • Jihwan_Kim's avatar
    Jihwan_Kim
    2 years ago

    Hi,

    Please check the below picture and the attached pbix file.

    Thank you.

     

     

    Expected result measure = 
    VAR _customerselect = SELECTEDVALUE('Table 2'[Customer])
    VAR _statusselect = SELECTEDVALUE('Table 2'[Status])
    VAR _type =
        SUMMARIZE (
            FILTER (
                'Table 1',
                'Table 1'[Customer] = _customerselect
                    && 'Table 1'[Tool] = "Yes"
            ),
            'Table 1'[Type]
        )
    VAR _condition = _statusselect = "Online"
    RETURN
        IF ( _condition, _type )