Forum Discussion
Anonymous
6 years agoNot applicable
Filtered SWITCH with blank values
The site column allows for duplicate values and I need the resulting values to be duplicated for each site. The user column allows mixed and blank values. I need the wanted column to reflect the mo...
- 6 years ago
Hi Anonymous
Enter value(like c,d) which you'd like to use as priority into a table and keep the value on the order as you need.
then in Transform data, add a custom column from the "value" list and extract values.
close&&apply, create columns with dax
Column1 = IF([User]<>BLANK(),FIND([User],[Custom],1,0)) Column = VAR m = CALCULATE ( MIN ( [Column1] ), FILTER ( 'Table 4', 'Table 4'[Site] = EARLIER ( 'Table 4'[Site] ) && 'Table 4'[Column1] > 0 ) ) RETURN IF ( m <> BLANK (), CALCULATE ( MIN ( 'Table 4'[User] ), FILTER ( 'Table 4', 'Table 4'[Site] = EARLIER ( 'Table 4'[Site] ) && [Column1] = m && [Column1] > 0 ) ), "Unconfirmed" )Best Regards
Maggie
Community Support Team _ Maggie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
amitchandak
6 years agoSuper User
Anonymous , Logic is not very clear to me.
Try a new column like
new column =
var _1 = minx(filter(table,[Site] =earlier([Site])),[User])
return
if(isblank(_1),"Unconfirmed",_1)
- Anonymous6 years agoNot applicable
amitchandak Thanks for your reply. The problem I am running into is this. I have the blanks that prevent me from having the ELSE statement at the end of my DAX. If I say
[Site] = A, "A", "Unconfirmed"
Then when I have
Site User Wanted 1 A A 1 Unconfirmed When what I really want is like this
Site User Un-Wanted 1 A A 1 A 2 Unconfirmed