Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
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
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
109 | |
99 | |
77 | |
66 | |
54 |
User | Count |
---|---|
144 | |
104 | |
102 | |
87 | |
64 |