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!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
Can someone instruct me how to get rid of this DAX error. A single value for column 'dmc_name' in table 'dmc' cannot be determined. This can happen when a measure formula refers to a column that contains many values .
Solved! Go to Solution.
Hi @U156531 ,
Based on the description provided, it looks like you are encountering an issue where the IF statement in your DAX expression is expecting a single value for the 'dmc_name' column but is instead getting multiple values. This typically happens in a row context where the column reference is ambiguous.
You can use the selectedvalue function in your original formulas to specify the value you choose to match the logic of the judgment.
Here is my test data:
Crate a measure
Name = IF(SELECTEDVALUE(dmc[dmc_name]) = "AURORA","b","a")
FInal output
Best regards
Albert He
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Hi @U156531 ,
Based on the description provided, it looks like you are encountering an issue where the IF statement in your DAX expression is expecting a single value for the 'dmc_name' column but is instead getting multiple values. This typically happens in a row context where the column reference is ambiguous.
You can use the selectedvalue function in your original formulas to specify the value you choose to match the logic of the judgment.
Here is my test data:
Crate a measure
Name = IF(SELECTEDVALUE(dmc[dmc_name]) = "AURORA","b","a")
FInal output
Best regards
Albert He
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Try this:
Name =
VAR name = 'dmc'[dmc_name]
RETURN
IF(name = "AURORA" , "b","a")
Yes you can use filter function in this way
Name =
IF(
COUNTROWS(FILTER('dmc', 'dmc'[dmc_name] = "AURORA")) > 0,
"b",
"a"
)
Proud to be a Super User! |
|
, Try this one
And accept as solution if it helps
Proud to be a Super User! |
|
No, The Max function only looks at the greatest dmc_name value in the table and I need to inspect every occurance of the dmc_name. Can I use some other function like Filter or Calculate or a grouping function inside the If statement or inplace of it?
hello @U156531 ,
can you please provide the pbix file so i can take a look and try to help you with the solution ?
if you cant , could you at least share screenshots about the sample data and the output desired ?
best regards
User | Count |
---|---|
98 | |
75 | |
74 | |
49 | |
26 |