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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Syndicate_Admin
Administrator
Administrator

Array does not sum data correctly

Hello

I have a matrix to present some data. The array has several levels, the problem is that when I start expanding the levels, the values don't add up and don't match the total, I attach a screenshot as a reference

drgonm5_1-1748532932501.png

For example here, Arkansas shows 12, if I expand to the next level AR-Rogers shows 12 as well, but then if I expand to the last level where it shows by "role" it adds up to 11 and not the 12. I've already checked the filters, segmentations and everything seems fine, it's only the sum that isn't right, and if I was filtering something the sum should be updated right?

Thank you for your help

1 ACCEPTED SOLUTION
v-ssriganesh
Community Support
Community Support

Hi @Syndicate_Admin,
Thank you for reaching out to the Microsoft Fabric Community Forum.

I have reproduced your issue in Power BI Desktop and implemented the required logic to handle the (Blank) roles by replacing them with "Unassigned".

What I did:

  • Created a new calculated column using the following DAX:
RoleFixed = IF(

    ISBLANK('EnrollmentData'[Role]),

    "Unassigned",

    'EnrollmentData'[Role]

)
  • Used the new RoleFixed column in the Matrix visual, and it correctly displays "Unassigned" instead of blank for roles.
  • Verified the total enrolled counts match the original data.

Expected output:

vssriganesh_0-1748580294966.png

This meets the expected outcome based on your requirement.

For your reference, I’ve attached the working .pbix file.

If this information is helpful, please “Accept as solution” and give a "kudos" to assist other community members in resolving similar issues more efficiently.
Thank you.

View solution in original post

5 REPLIES 5
v-ssriganesh
Community Support
Community Support

Hi @Syndicate_Admin,

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.

v-ssriganesh
Community Support
Community Support

Hi @Syndicate_Admin,
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.

 

v-ssriganesh
Community Support
Community Support

Hi @Syndicate_Admin,
Thank you for reaching out to the Microsoft Fabric Community Forum.

I have reproduced your issue in Power BI Desktop and implemented the required logic to handle the (Blank) roles by replacing them with "Unassigned".

What I did:

  • Created a new calculated column using the following DAX:
RoleFixed = IF(

    ISBLANK('EnrollmentData'[Role]),

    "Unassigned",

    'EnrollmentData'[Role]

)
  • Used the new RoleFixed column in the Matrix visual, and it correctly displays "Unassigned" instead of blank for roles.
  • Verified the total enrolled counts match the original data.

Expected output:

vssriganesh_0-1748580294966.png

This meets the expected outcome based on your requirement.

For your reference, I’ve attached the working .pbix file.

If this information is helpful, please “Accept as solution” and give a "kudos" to assist other community members in resolving similar issues more efficiently.
Thank you.

Hi @Syndicate_Admin,
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 other community members with similar problems can find a solution faster.
Thank you.

pankajnamekar25
Super User
Super User

Hello @Syndicate_Admin 

Try this measure

AdjustedCount =

IF(

    HASONEVALUE('Roles'[RoleName]),

    COUNT('Table'[UserID]),  -- detail level

    SUMX(

        VALUES('Roles'[RoleName]),

        CALCULATE(COUNT('Table'[UserID]))

    )

)

Thanks,
 Pankaj Namekar | LinkedIn

If this solution helps, please accept it and give a kudos (Like), it would be greatly appreciated.

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.