Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
AMBP1973
Helper III
Helper III

Single Selection of aggregated columns

Hello,

 

I am seeking a solution for the following:

 

I have created the following Dax to aggregate 3 columns into one to aggregate 'positions assigned against roles for a particular task:

 

Content Manage. Roles Aggr = 'DI Review'[Content Author] & "-" & 'DI Review'[Content Manager] & "-" & 'DI Review'[Approver]
 
Context
Essentially, all three columns have the same attributes (positions) against a particular role (Content Author, Content Manager, Approver); in this case the 'role' is the column title i.e. 
Each row in the dataset is repesented as a task, and against that task are three 'roles' required to complete the task. For any particular task a 'position' can be assigned 1 or all of those roles for that individual task. Example of data from spreadsheet below:
 
 
AMBP1973_0-1761879692300.png

 

Solution Required:

I would like to show how many tasks by position, but have the role/s defined in the chart also, and if possible ensure the 'total' numbers are a distinct number against the tasks and not a reflection of how many roles a 'position' has across all tasks.

Here is a chart I started with

 

AMBP1973_1-1761880103324.png

 

I would also like a slicer that enables selection of a single position to filter by. At the moment it only gives me the below

 

AMBP1973_2-1761880251406.png

 

 Hopefully this makes sense. Unfortunately, I cannot share the data.

 

Any assistance would be much appreciated 🙂

6 REPLIES 6
Ahmed-Elfeel
Responsive Resident
Responsive Resident

Hi @AMBP1973,

I hope you are doing good today☺️❤️

 

It is hard to answer without Sample data but i will do my best to solve your issue...So The issue is that your current approach with concatenation makes it difficult to analyze individual positions and roles separately

 

Instead of concatenating, create separate tables for analysis:

  • Create a Roles Table:

Roles = 
VAR RoleTable = 
    UNION(
        SELECTCOLUMNS('DI Review', "Position", 'DI Review'[Content Author], "Role", "Content Author", "Task", 'DI Review'[Task ID]),
        SELECTCOLUMNS('DI Review', "Position", 'DI Review'[Content Manager], "Role", "Content Manager", "Task", 'DI Review'[Task ID]),
        SELECTCOLUMNS('DI Review', "Position", 'DI Review'[Approver], "Role", "Approver", "Task", 'DI Review'[Task ID])
    )
RETURN
    RoleTable

 

Then Create Measures for Analysis :

  • Total Distinct Tasks by Position:

Total Tasks = 
CALCULATE(
    DISTINCTCOUNT('Roles'[Task]),
    ALL('Roles'[Role])
)
  • Tasks by Role (for breakdown😞

Tasks by Role = 
DISTINCTCOUNT('Roles'[Task])
  • Role specific measures:
Content Author Tasks = 
CALCULATE(
    DISTINCTCOUNT('Roles'[Task]),
    'Roles'[Role] = "Content Author"
)

Content Manager Tasks = 
CALCULATE(
    DISTINCTCOUNT('Roles'[Task]),
    'Roles'[Role] = "Content Manager"
)

Approver Tasks = 
CALCULATE(
    DISTINCTCOUNT('Roles'[Task]),
    'Roles'[Role] = "Approver"
)

 

Then Create Your Visualize you prefer (I will Skip this Step cause its easy)

 

But, If you prefer a matrix view Create this:

Task Count by Role = 
VAR SelectedRole = SELECTEDVALUE('Role List'[Role])
RETURN
IF(
    ISBLANK(SelectedRole),
    [Total Tasks],
    CALCULATE(
        DISTINCTCOUNT('Roles'[Task]),
        'Roles'[Role] = SelectedRole
    )
)

 

Final Step is Creating Supporting Tables:

Role List = 
DATATABLE(
    "Role", STRING,
    {
        {"Content Author"},
        {"Content Manager"}, 
        {"Approver"}
    }
)

 

Tell me if you need further help ☺️❤️

if this post helps, then I would appreciate a thumbs up and mark it as the solution to help the other members find it more quickly.
v-pgoloju
Community Support
Community Support

Hi @AMBP1973,

 

Just following up to see if the Response provided by community member were helpful in addressing the issue. if the issue still persists Feel free to reach out if you need any further clarification or assistance.

 

Best regards,
Prasanna Kumar

 

Hello @v-pgoloju , I did respond with further query below. I'd appreciate some further clarification. Thankyou

v-pgoloju
Community Support
Community Support

Hi @AMBP1973 ,

 

Thank you for reaching out to the Microsoft Fabric Forum Community, and special thanks to @xifeng_L  for prompt and helpful response.

Just following up to see if the Response provided by community member were helpful in addressing the issue. if the issue still persists Feel free to reach out if you need any further clarification or assistance.

 

Best regards,
Prasanna Kumar

 

xifeng_L
Super User
Super User

Hi @AMBP1973 

 

You can use PowerQuery to convert the table structure into the structure shown in the following figure.

 

xifeng_L_0-1761894568603.png

 

Then, create the measure and bar chart as below: 

 

xifeng_L_1-1761894612163.png

 

 

Did I answer your question? If yes, pls mark my post as a solution and appreciate your Kudos !

 

Thank you~

Hello @xifeng_L , Thankyou so much for your solution. Unfortunately I cannot open your demo file as my organisation does not allow this file, could you please provide the dax and simple steps to follow. Many thanks

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.