The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.
Hello PowerBI developer,
I need to concatenate multiple case statements in @PowerBI like below in SQL. I'm not able to get this can anyone please help me with this?
CONCAT((CASE WHEN DOWMonday = 'Y' THEN 'M' ELSE ' ' END)
,(CASE WHEN DOWTuesday = 'Y' THEN 'T' ELSE ' ' END)
,(CASE WHEN DOWWednesday = 'Y' THEN 'W' ELSE ' ' END)
,(CASE WHEN DOWThursday = 'Y' THEN 'R' ELSE ' ' END)
,(CASE WHEN DOWFriday = 'Y' THEN 'F' ELSE ' ' END)
) AS [Days]
Thanks,
KK
@Anonymous , Try like, a new column in DAX
if( DOWMonday = "Y", "M", blank()) & if( DOWTuesday = "Y", "T", blank()) & if( DOWWednesday = "Y", "W", blank()) & if( DOWThursday = "Y", "T", blank()) & if( DOWFriday = "Y", "F", blank())
Or you can use space in place of blank
if( DOWMonday = "Y", "M", " ") & if( DOWTuesday = "Y", "T", " " ) & if( DOWWednesday = "Y", "W", " ") & if( DOWThursday = "Y", "T", " ") & if( DOWFriday = "Y", "F", " ")
User | Count |
---|---|
13 | |
8 | |
8 | |
7 | |
5 |
User | Count |
---|---|
21 | |
15 | |
15 | |
10 | |
7 |