The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
Getting the error "Query (2, 1) Failed to resolve name 'AG'. It is not a valid table, variable, or function name" with below query, please help Thanks!
UG1 | GROUP_TYPE | AG | ITEM_TYPE | LOGIN | NAME | TYPE |
A-1 | UG | AM | AG | 1234 | Ana | 1 |
A-1 | UG | AM1 | AG | 12345 | Ben | 1 |
A-2 | UG | AMF | AG | 123456 | Dan | 1 |
Databel table after aggregation:
UG AG
A-1 AM;AM1
A-2 AMF
Solved! Go to Solution.
Hi @maximilius,
After thoroughly reviewing the details you provided, I was able to reproduce the scenario, and it worked on my end. I have used it as sample data on my end and successfully implemented it.
Dax Measure:
AG_Concat_Duplicates =
CONCATENATEX(
FILTER(AGTable, AGTable[UG] = MAX(AGTable[UG])),
AGTable[AG],
";"
)
I am also including .pbix file for your better understanding, please have a look into it:
If this post helps, then please give us ‘Kudos’ and consider Accept it as a solution to help the other members find it more quickly.
Thank you for using Microsoft Community Forum.
Hi @maximilius,
Thank you for reaching out to the Microsoft fabric community forum. Thank you @Deku, @bhanu_gautam, for your inputs on this issue.
After thoroughly reviewing the details you provided, I was able to reproduce the scenario, and it worked on my end. I have used it as sample data on my end and successfully implemented it.
Dax Measure for UAM Aggregated:
UAM_Aggregated =
ADDCOLUMNS(
SUMMARIZE('UAM', 'UAM'[UG1]),
"AG_Combined", CONCATENATEX(
FILTER('UAM', 'UAM'[UG1] = EARLIER('UAM'[UG1])),
'UAM'[AG],
";"
)
)
I am also including .pbix file for your better understanding, please have a look into it:
If this post helps, then please give us ‘Kudos’ and consider Accept it as a solution to help the other members find it more quickly.
Thank you for using Microsoft Community Forum.
Thank you for the help , I am trying to get DISTINCT AG after CONCETENATE as right now the output will be as below: Tried to add in the DISTINCT function before FILTER but no luck, any clue? thanks
UG AG
A-1 AM;AM;AM1
A-2 AMF;AMF
Hi @maximilius,
After thoroughly reviewing the details you provided, I was able to reproduce the scenario, and it worked on my end. I have used it as sample data on my end and successfully implemented it.
Dax Measure:
AG_Concat_Duplicates =
CONCATENATEX(
FILTER(AGTable, AGTable[UG] = MAX(AGTable[UG])),
AGTable[AG],
";"
)
I am also including .pbix file for your better understanding, please have a look into it:
If this post helps, then please give us ‘Kudos’ and consider Accept it as a solution to help the other members find it more quickly.
Thank you for using Microsoft Community Forum.
Hi @maximilius,
May I ask if you have resolved this issue? If so, please mark the helpful reply and accept it as the solution. This will be helpful for other community members who have similar problems to solve it faster.
Thank you.
Hi @maximilius,
I wanted to check if you had the opportunity to review the information provided. Please feel free to contact us if you have any further questions. If my response has addressed your query, please accept it as a solution and give a 'Kudos' so other members can easily find it.
Thank you.
Hi @maximilius,
I hope this information is helpful. Please let me know if you have any further questions or if you'd like to discuss this further. If this answers your question, please Accept it as a solution and give it a 'Kudos' so others can find it easily.
Thank you.
When using EVALUATE the output needs to be a table
You could something like
Evaluate
Define AG =CONCATENATEX(
FILTER(
'UAM',
'UAM'[AG] = MAX('UAM'[AG])
),
'UAM'[UG1],
";"
)
{Ag}
@maximilius , Use
dax
AG =
CONCATENATEX(
FILTER(
'UAM',
'UAM'[AG] = MAXX(ALL('UAM'), 'UAM'[AG])
),
'UAM'[UG1],
";"
)
Proud to be a Super User! |
|
Thanks!
Getting the below:
Query (2, 1) The syntax for 'AG' is incorrect. (dax
AG =
CONCATENATEX(
FILTER(
'UAM',
'UAM'[AG] = MAXX(ALL('UAM'), 'UAM'[AG])
),
'UAM'[UG1],
";"
)).
User | Count |
---|---|
16 | |
8 | |
6 | |
6 | |
5 |
User | Count |
---|---|
23 | |
13 | |
13 | |
8 | |
8 |