Forum Discussion
Wrong result when putting different date.
Hi,
I wrote a measure like following:
When I put "Start Date" in the table, the result is correct. But for the bottom two tables, which I put "YearMonth" and "YearWeek" in the table, the result is not correct. Any solution to fix this?
Thanks a lot for your help!
Hi YunJ ,
To my understanding, try to create your measure like so:
8 (2) = CALCULATE ( SUM ( timetest[Sales] ), FILTER ( ALLSELECTED ( timetest ), timetest[Land Date] IN VALUES ( timetest[Start Date] ) && timetest[Presale_or not] = "Y" ) )Best Regards,
Icey
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
8 Replies
- Icey
Community Support
Hi YunJ ,
To my understanding, try to create your measure like so:
8 (2) = CALCULATE ( SUM ( timetest[Sales] ), FILTER ( ALLSELECTED ( timetest ), timetest[Land Date] IN VALUES ( timetest[Start Date] ) && timetest[Presale_or not] = "Y" ) )Best Regards,
Icey
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- Icey
Community Support
Hi YunJ ,
1. I use ALLSELECTED() to Remove context filters from columns and rows in the current query, while retaining all other context filters or explicit filters. For details, please refer to this blog: The definitive guide to ALLSELECTED.
2. If use SELECTEDVALUE(), the expression only works when one record "selected". But use VALUES(), it will return a list of records.
Best Regards,
Icey
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.