Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
Hi asking for help.
I want to group values from different columns. i want to group the cost value in column Q3.1. A Cost, Q3.1.B Cost, Q3.1. Cost, Q3.1.D Cost to 0, blank, 1-500, 501-1000, >1000
Chatgp suggested me this DAX Measure but it doesnt work.
Q3 Cost List Grouped =
VAR CostsTable =
{
[Q3.1. A Cost],
[Q3.1.B Cost],
[Q3.1.C Cost],
[Q3.1.D Cost],
[Q3.1.E Cost],
[Q3.1.Other Amenity Cost]
}
RETURN
CONCATENATEX(
ADDCOLUMNS(
SELECTCOLUMNS(
GENERATESERIES(1, 6, 1),
"Cost", SWITCH([Value],
1, [Q3.1. A Cost],
2, [Q3.1.B Cost],
3, [Q3.1.C Cost],
4, [Q3.1.D Cost],
5, [Q3.1.E Cost],
6, [Q3.1.Other Amenity Cost]
)
),
"Group",
VAR c = [Cost]
RETURN
SWITCH(
TRUE(),
ISBLANK(c), "Blank",
c = 0, "0",
c >= 1 && c <= 500, "1-500",
c >= 501 && c <= 1000, "501-1000",
c > 1000, ">1000",
BLANK()
)
),
[Group],
", "
)
Solved! Go to Solution.
Hi @Boopep ,
Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).
Do not include sensitive information. Do not include anything that is unrelated to the issue or question.
Please show the expected outcome based on the sample data you provided.
Thank you.
Hi @Boopep
Thanks for reaching out to the Microsoft fabric community forum.
I would also take a moment to thank @rajendraongole1 , for actively participating in the community forum and for the solutions you’ve been sharing in the community forum. Your contributions make a real difference.
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.
Best Regards,
Menaka.
Community Support Team
not yet.... hope you can help me with this
Hi @Boopep ,
Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).
Do not include sensitive information. Do not include anything that is unrelated to the issue or question.
Please show the expected outcome based on the sample data you provided.
Thank you.
Hi @Boopep ,
As we haven’t heard back from you, so just following up to our previous message. I'd like to confirm if you've successfully resolved this issue or if you need further help.
If yes, you are welcome to share your workaround and mark it as a solution so that other users can benefit as well. If you find a reply particularly helpful to you, you can also mark it as a solution.
If you still have any questions or need more support, please feel free to let us know. We are more than happy to continue to help you.
Thank you for your patience and look forward to hearing from you.
Hi @Boopep ,
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 @Boopep ,
Can you please confirm whether you have resolved issue. If yes, you are welcome to share your workaround and mark it as a solution so that other users can benefit as well. This will be helpful for other community members who have similar problems to solve it faster.
If we don’t hear back, we’ll go ahead and close this thread.Should you need further assistance in the future, we encourage you to reach out via the Microsoft Fabric Community Forum and create a new thread. We’ll be happy to help.
Thank you.
Hi @Boopep - you can use the concatenate as like below measure:
Q3 Cost List Grouped =
VAR Costs = {
[Q3.1. A Cost],
[Q3.1.B Cost],
[Q3.1.C Cost],
[Q3.1.D Cost]
}
VAR Grouped =
ADDCOLUMNS (
SELECTCOLUMNS ( Costs, "Cost", [Value] ),
"Group",
SWITCH (
TRUE(),
ISBLANK([Cost]), "Blank",
[Cost] = 0, "0",
[Cost] >= 1 && [Cost] <= 500, "1-500",
[Cost] >= 501 && [Cost] <= 1000, "501-1000",
[Cost] > 1000, ">1000",
"Unknown"
)
)
RETURN
CONCATENATEX ( Grouped, [Group], ", " )
Hope this helps.
Proud to be a Super User! | |
Table constructor cannot have optional argument.
That is the error i encountered
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
81 | |
79 | |
59 | |
35 | |
34 |
User | Count |
---|---|
100 | |
62 | |
56 | |
47 | |
41 |