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!Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.
Hi ,
I am using report builder to connect to a power BI dataset. when I use the following DAX query, then it throws an error. does anyone know how to fix it?
EVALUATE
VAR a =
SUMMARIZECOLUMNS (
'table1'[id],
'table2'[cid],
RSCustomDaxFilter(@CDate,EqualToCondition,[CycleDate].[Date],DateTime),
"MTD Sub ANP", [MTD Sub ANP],
"Flag", 0,
"Order",FORMAT(VALUE(MAX('CHANNEL'[Order])) , "#00.0")
)
VAR b =
SUMMARIZECOLUMNS (
'table1'[type_id],
'table2'[cid],
RSCustomDaxFilter(@CDate,EqualToCondition,[CycleDate].[Date],DateTime),
"MTD Sub ANP", [MTD Sub ANP],
"Flag", 0,
"Order",FORMAT(4.5 , "#00.0"),
FILTER(CHANNEL , CHANNEL[ID] in {5,6}))
)
return
UNION(a,b)
thanks.
If the error still persists, please provide more details about the error message so I can try to help you better.
If my response(s) assisted you in any way, don't forget to drop me a "Kudos" 🙂
Here's the corrected code:
EVALUATE
VAR a =
SUMMARIZECOLUMNS (
'table1'[id],
'table2'[cid],
RSCustomDaxFilter(@CDate,EqualToCondition,[CycleDate].[Date],DateTime),
"MTD Sub ANP", [MTD Sub ANP],
"Flag", 0,
"Order",FORMAT(VALUE(MAX('CHANNEL'[Order])), "#00.0")
)
VAR b =
SUMMARIZECOLUMNS (
'table1'[type_id],
'table2'[cid],
RSCustomDaxFilter(@CDate,EqualToCondition,[CycleDate].[Date],DateTime),
"MTD Sub ANP", [MTD Sub ANP],
"Flag", 0,
"Order",FORMAT(4.5 , "#00.0"),
FILTER(CHANNEL , CHANNEL[ID] in {5,6})
)
return
UNION(a,b)
The error you're encountering might be due to a syntax error in the DAX code. It looks like there's an extra parenthesis at the end of the code.
Here are some suggestions to help resolve the issue:
Can you please share some examples of data? can you put the error that you get?
User | Count |
---|---|
9 | |
5 | |
3 | |
3 | |
2 |