Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
I'm brand new to Power BI and am trying to add a new column to my current fields.
I have an existing column (Data[FIELD]) that consists of whole numbers. The new column (fxSHIFT) I am trying to create needs to associate these values with letters.
The following statement returns the error "Too many arguments were passed to the IF function. The maximum argument count for the function is 3.":
Data[FIELD] | fxSHIFT |
0 | D |
1 | D |
2 | D |
3 | D |
4 | D |
5 | D |
6 | D |
7 | D |
8 | D |
9 | M |
10 | M |
11 | M |
12 | M |
13 | M |
14 | E |
15 | E |
16 | E |
17 | E |
18 | E |
19 | N |
20 | N |
21 | N |
22 | N |
23 | N |
Solved! Go to Solution.
I don't think it's an issue with the argument limit - it's probably a syntax issue (missing a bracket or an extra comma somewhere, something like that). I would suggest using a switch statement for readability (it's pretty much the same as an if statement).
measure = SWITCH( TRUE(),
Data[FIELD] < 9, "D",
Data[FIELD] < 14, "M",
Data[FIELD] < 19, "E",
"N"
)
I don't think it's an issue with the argument limit - it's probably a syntax issue (missing a bracket or an extra comma somewhere, something like that). I would suggest using a switch statement for readability (it's pretty much the same as an if statement).
measure = SWITCH( TRUE(),
Data[FIELD] < 9, "D",
Data[FIELD] < 14, "M",
Data[FIELD] < 19, "E",
"N"
)
Perfect! The switch true statement worked great.
Thanks for your help!
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
72 | |
67 | |
51 | |
38 | |
26 |
User | Count |
---|---|
89 | |
52 | |
45 | |
39 | |
38 |