Forum Discussion

yellingdog's avatar
yellingdog
New Member
4 years ago
Solved

CONTAINSTRING in Measure problem

Hello,    I have created a gauge that shows the latest value of a measurement. I do this with this measure:         Temperature = CALCULATE( SELECTEDVALUE(koreaData[temp]), FILTER(koreaData, ...
  • Anonymous's avatar
    Anonymous
    4 years ago

    Hi yellingdog ,

    First, please change the data type of column timestamp as Date/Time in Power Query Editor:

    Change the data type of column timestamp as Date/Time

    Then update your measure as below:

    Temperature =
    VAR _excludedate = DATE ( 2021, 9, 21 )
    RETURN
    CALCULATE (
    SELECTEDVALUE ( koreaData[temp] ),
    FILTER (
    koreaData,
    koreaData[timestamp] = MAX ( koreaData[timestamp] )
    && DATE ( YEAR ( 'koreaData'[timestamp] ), MONTH ( 'koreaData'[timestamp] ), DAY ( 'koreaData'[timestamp] ) ) <> _excludedate
    )
    )

    You can find the attachment for all details. 

    Best Regards