We're giving away 30 tickets for FREE! Share your story, your vision, or your hustle and tell us why YOU deserve a ticket.
Apply nowWin a FREE 3 Day Ticket to FabCon Vienna. Apply now
Solved! Go to Solution.
Hello,
I don't think it can work like that. Try this:
DEVCAT SWITCH =
SWITCH (
TRUE(),
CONTAINSSTRING('TEMP STATES - ALL'[DEVCAT], "84"), "SECTIONALIZER",
AND(
CONTAINSSTRING('TEMP STATES - ALL'[DEVCAT], "4"),
CONTAINSSTRING('TEMP STATES - ALL'[DEVICE], "SC_")
), "SECTIONALIZER",
AND(
CONTAINSSTRING('TEMP STATES - ALL'[DEVCAT], "4"),
CONTAINSSTRING('TEMP STATES - ALL'[DEVICE], "SW_")
), "SWITCH",
AND(
CONTAINSSTRING('TEMP STATES - ALL'[DEVCAT], "4"),
CONTAINSSTRING('TEMP STATES - ALL'[DEVICE], "_CB")
), "FEEDER",
CONTAINSSTRING('TEMP STATES - ALL'[DEVCAT], "4"), "SWITCH",
CONTAINSSTRING('TEMP STATES - ALL'[DEVCAT], "18"), "FUSE",
CONTAINSSTRING('TEMP STATES - ALL'[DEVCAT], "8"), "SERVICE TRANSFORMER",
CONTAINSSTRING('TEMP STATES - ALL'[DEVCAT], "19"), "RECLOSER",
CONTAINSSTRING('TEMP STATES - ALL'[DEVCAT], "21"), "RECLOSER",
CONTAINSSTRING('TEMP STATES - ALL'[DEVCAT], "26"), "LINECUT",
CONTAINSSTRING('TEMP STATES - ALL'[DEVCAT], "92"), "SERVICE",
CONTAINSSTRING('TEMP STATES - ALL'[DEVCAT], "9"), "TRANSMISSION",
ISBLANK('TEMP STATES - ALL'[DEVCAT]), "BLANK",
"REPORT"
)
Hello,
I don't think it can work like that. Try this:
DEVCAT SWITCH =
SWITCH (
TRUE(),
CONTAINSSTRING('TEMP STATES - ALL'[DEVCAT], "84"), "SECTIONALIZER",
AND(
CONTAINSSTRING('TEMP STATES - ALL'[DEVCAT], "4"),
CONTAINSSTRING('TEMP STATES - ALL'[DEVICE], "SC_")
), "SECTIONALIZER",
AND(
CONTAINSSTRING('TEMP STATES - ALL'[DEVCAT], "4"),
CONTAINSSTRING('TEMP STATES - ALL'[DEVICE], "SW_")
), "SWITCH",
AND(
CONTAINSSTRING('TEMP STATES - ALL'[DEVCAT], "4"),
CONTAINSSTRING('TEMP STATES - ALL'[DEVICE], "_CB")
), "FEEDER",
CONTAINSSTRING('TEMP STATES - ALL'[DEVCAT], "4"), "SWITCH",
CONTAINSSTRING('TEMP STATES - ALL'[DEVCAT], "18"), "FUSE",
CONTAINSSTRING('TEMP STATES - ALL'[DEVCAT], "8"), "SERVICE TRANSFORMER",
CONTAINSSTRING('TEMP STATES - ALL'[DEVCAT], "19"), "RECLOSER",
CONTAINSSTRING('TEMP STATES - ALL'[DEVCAT], "21"), "RECLOSER",
CONTAINSSTRING('TEMP STATES - ALL'[DEVCAT], "26"), "LINECUT",
CONTAINSSTRING('TEMP STATES - ALL'[DEVCAT], "92"), "SERVICE",
CONTAINSSTRING('TEMP STATES - ALL'[DEVCAT], "9"), "TRANSMISSION",
ISBLANK('TEMP STATES - ALL'[DEVCAT]), "BLANK",
"REPORT"
)
Worked like a charm. Thank you.
User | Count |
---|---|
67 | |
61 | |
47 | |
35 | |
32 |
User | Count |
---|---|
87 | |
72 | |
57 | |
51 | |
45 |