Forum Discussion
Dom87326
4 years agoHelper II
Conditional expression
Hello, I'm trying to write a complex conditional expression using the IF or SIWTCH. My data model is the DimDate: DimCustomer table: CustomerKey CustomerName 094234 A 09...
Dom87326
4 years agoHelper II
tamerj1 ,
For the Fact table and when user filter's Customer Key 094543:
CustomerKey Date Sales Year
| 094234 | 20200101 | 14512 | 2020 |
| 094234 | 20200102 | 43212 | 2021 |
| 094543 | 20210101 | 54986 | 2021 |
| 094092 | 20210102 | 12321 | 2020 |
I expect that Check Filtered measure returns True (as the Year is 2021). If user filters Customer Key 094092 it returns false, because of Year value 2020. For Customer Key 094234 measure returns false, because it has two year records 2021 and 2020.
Thanks!