Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
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 |
---|---|
10 | |
10 | |
3 | |
2 | |
1 |