Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Hello,
I am trying to combine two columns where it will give me the Day of year # and the day of week name.
The issue is I have some pre-calculations that determine the state of the row to be "Future" or "Late" if this is the case I do not want to combine the columns.
So only combine the "Daily State" and "Day Name" if the "Daily State" value does not equal "Future" or "Late"
See the screenshot below for reference.
Any help would be greatly appreciated.
Thanks!
Jeremy
Solved! Go to Solution.
or in DAX
Combine = IF([Daily State] = "Future" || [Daily State] = "Late", "", [Daily State] & " " & [Day Name])
Convert both column in text before going for DAX.
Hope it helps.
Hi @Grimfandango227 ,
Perhaps you could test:
NewCombine = IF([Daily State] = "Future" , "Future", IF([Daily State] = "Late", "Late", [Daily State] & " " & [Day Name]))
Hope it helps.
HI @Grimfandango227 ,
In Power query try as below:
if [Daily State]="Future" or [Daily State]="Late" then "" else [Daily State]&[Day Name]
Hope it helps.
Hello @mahenkj2 ,
Thanks for the help, this worked! Although I am wondering, is there a way to still return "Future" and "Late" into that new column just without the number?
See screenshot below,
Thanks!
Jeremy
Hi @Grimfandango227 ,
Perhaps you could test:
NewCombine = IF([Daily State] = "Future" , "Future", IF([Daily State] = "Late", "Late", [Daily State] & " " & [Day Name]))
Hope it helps.
or in DAX
Combine = IF([Daily State] = "Future" || [Daily State] = "Late", "", [Daily State] & " " & [Day Name])
Convert both column in text before going for DAX.
Hope it helps.
In your Logic Test change the 'Or' to an 'And'
Option 1
State Combo = IF([Daily State] <> "Future" && [Daily State] <> "Late", [Daily State] & " " & [Day Name], "")
Option 2
State Combo = IF(AND([Daily State] <> "Future", [Daily State] <> "Late"), [Daily State] & " " & [Day Name], "")
@Grimfandango227 In Power Query that should be:
= if [Daily State] <> "Future" or [Daily State] <> "Late" then [Daily State] & " " & [Day Name] else null
in DAX
IF([Daily State] <> "Future" || [Daily State] <> "Late", [Daily State] & " " & [Day Name], BLANK() )
Good Afternoon @Greg_Deckler ,
Thanks for the response! Although it does not appear to be working. (See screenshots below)
= DAX
Outcome ↓↓
It would appear that I am still getting the day name with "Future" and "Late" States.
Thanks again for the help!
Jeremy
User | Count |
---|---|
106 | |
89 | |
81 | |
76 | |
73 |
User | Count |
---|---|
112 | |
104 | |
96 | |
74 | |
66 |