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
Dom87326
I think it might be much more simple than we thought. Please try
Check Filtered =
ISINSCOPE ( DimCustomer[CustomerName] )
&& COUNTROWS ( VALUES ( Fact[Date].[Year] ) ) = 1
&& COUNTROWS ( ALL ( Fact[Date].[Year] ) ) = 1Dom87326
4 years agoHelper II
Hello tamerj1 ,
Sorry for the late reply. As I wrote before, I'm tyring to create a white coloured shape to overlay on top of other visuals with conditional fill attribute, that will be transparent based on the filter selections.
Measure to return TRUE/FALSE:
Check Filtered =
ISINSCOPE ( DimCustomer[CustomerName] )
&& COUNTROWS ( VALUES ( Fact[Date].[Year] ) ) = 1
&& COUNTROWS ( ALL ( Fact[Date].[Year] ) ) = 1
Make Transparent =
IF(
[Check Filtered],
"White",
"#FFFFFF00" -- returns transparent if [Check Filtered] is False
)Unfortunately, with you sugested approach I reveice a syntax error for Fact[Date].[Year]. Fact[Date] column is date type, with 2021-01-01 values formatted as YYYY.
Thanks!