Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hello there!
I'm just learning DAX so maybe this question isn't hard at all. I found this Top 3 ranking example in other site X. I tried to implement it from the scratch but I got an error I can't fix neither understand.
Table:
Measures:
Sum Value = SUM(Test[Value])
Rank Name =
IF(
HASONEVALUE(Test[Name]),
RANKX(ALL(Test[Name], Test[Value]), [Sum Value])
)
Top 3 Cases =
IF(
HASONEVALUE(Test[Name]),
IF(
[Rank Name] <= 3,
[Sum Value]
)
)
The error is highlighted in the measure Top 3 Cases:
The error is "the syntax of '[Sum Value] is incorrect".
I downloaded the original files from that site X and the same error occurs. I reviewed the comments looking for clues and I got nothing.
Maybe something in my Power BI Desktop settings is wrong. Or maybe something else. Any ideas, please?
Greetings!
Solved! Go to Solution.
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsRegards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsHi @MFelix!
It works! You were right. It was a regional setting issue. The code seems to be confunsing at first glance because 0 looks like the true argument in the IF statement and [Sum Value] looks like the false argument.
Fortunately, we can use several lines and spacing to make it clearer.
Thank you for your help!
Best regards!
fabo
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 41 | |
| 38 | |
| 36 | |
| 31 | |
| 28 |
| User | Count |
|---|---|
| 128 | |
| 88 | |
| 79 | |
| 68 | |
| 63 |