Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago

compare measure and column values

I have a measure using a SELECTEDVALUE and a calculated column. They're both whole numbers. How do you compare the values to return all the calculated columns that equal the measure? It returns records  for all the months for one year.
ReturnValue = IF(Table1[ColumnDateValue].[MonthNo] = Table1[MeasureValue],Table1[ColumnValue],BLANK())

3 Replies

  • v-lili6-msft's avatar
    v-lili6-msft
    Icon for Community Support rankCommunity Support

    hi, Anonymous 

    It couldn't achieve that compare measure and column values, they are a different expression in logic.

    For your requirement, you could create a measure based on the calculated column, then add another measure that 

    ReturnValue = IF(Table1[secondMeasure] = Table1[MeasureValue],1,0)

     

    Now just drag the calculate column into visual and drag the [ReturnValue] into the visual level filter and set is "1"

     

    If you still have the problem, Please share some sample data and expected output.

     

    Best Regards,

    Lin