Forum Discussion
IF condition across multiple tables returns blank/null values
- 2 years ago
Thanks all.
Only way i could solve it was to do a left join (merge) in power query using the caledar table as the base.
Hi 123abc ,
The weekday_type is coming from Calendar so, the second IF statement as you write it will not work.
databot_kd if you add a calculated column in Transaction table the syntax should be more like
VAR _week_type = RELATED ( 'Date'[weekday_type] ) RETURN IF ( _week_type = "Weekend", "symbol1", IF ( _week_type = "Weekday" || ISBLANK ( 'Transaction'[ref date] ), "symbol2", BLANK () ) )
As the "ref date" could be blank, an or condition is more appropriate. else make sure that your transaction table is properly fill.
If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly.
- databot_kd2 years agoHelper III
- ced_f2 years agoFrequent Visitor
Hi databot_kd ,
Not sure to understand what you are trying to achieve. The symbol you want to calculate is for Dimension or Fact table ?
the lines for which you don't have the symbol mean that these dates from Calendar table (Dimension) don't have a matching row in Fact table. so it's logic to get an empty symbol as symbol is calculate from Fact table.
- databot_kd2 years agoHelper III
ced_f
I just trying to flag two things:
1. If it is a weekday and there is no transaction date then Icon1
2. If it is a weekend then Icon2
My calendar table has the date in the first column and the weekday_type
My transactions has the ref_date which is linked to the Calendar.date
Would it be possible to replace empty then based on a condition?