Forum Discussion
CONTAINSTRING in Measure problem
- Anonymous4 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 )RETURNCALCULATE (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
So yeah sorry about that.
Columns temp and timestamp are 1:1.
An example of temp is 22.2
and an example of timestamp is 11/11/2021 13:05:23
| 22.2 | 11/11/2021 13:05:23 |
Temperature is my Measure and it is visualized in a gauge.
I would like a single timestamp value (21/06/2021 12:05:22) to not be included in the Measure.
hope it's better now
thanks
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