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...
tamerj1
4 years agoCommunity Champion
Ok then delete the .[Year]
Check Filtered =
ISINSCOPE ( DimCustomer[CustomerName] )
&& COUNTROWS ( VALUES ( Fact[Date] ) ) = 1
&& COUNTROWS ( ALL ( Fact[Date] ) ) = 1Dom87326
4 years agoHelper II
tamerj1 ,
I'm not using [Check Filtered] in any visual, rather as an input to [Make Transparent], therefore I guess HASONEVALUE suits better in this case?
In this example I've selected a single CustomerKey = 094543 in a slicer, and expect [Check Filtered] to return TRUE.
Fact:
CustomerKey Date Sales Year
094543 20210101 54986 2021
However I'm unable to get TRUE for [Check Filtered]. In the table below I've distingueshed each part of the formula we use.
Why do you think below measure is returning FALSE?
Check Filtered =
HASONEVALUE( DimCustomer[CustomerName] )
&& COUNTROWS ( VALUES ( Fact[Date] ) ) = 1
&& COUNTROWS ( ALL ( Fact[Date] ) ) = 1
Thanks a lot!