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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
AvPowerBI
Post Patron
Post Patron

Value Duplicating on Column - Matrix Chart

Hi,

I have 7 tables in my data model, which consist of the following tables:

 

PersonCalendar

Has a field called PersonId which is populated  per day for the last 13 months, includes flag fields to show if person should have been working, on holiday, sick etc.. 

This joins to the table FactVisits by PersonId and Date i.e 300_20200610 (300 is PersonId, underscore to seperate the two fields and 20200610 being the Date field in DDMMYYYY format)

 

FactVisits

Transaction table that will show visits by a PersonId, other fields would be like VisitId, Visit From (DateTime DataType), Visit To (DateTime DataType), Location etc..

This joins to the table PersonCalendar by PersonId and Visit From (I would convert this field to a Date format) i.e 300_20200610 (300 is PersonId, underscore to seperate the two fields and 20200610 being the Date field in DDMMYYYY format)

 

DimCustomer

Dimension Table to Customer Name, this joins to FactVisits

 

DimUser

Dimension Table that holds information on Persons Details, this joins to FactVisits

 

DimPlaceA

Dimension Table to show Place Area A for a Person, this joins to PersonCalendar

 

DimPlaceB

Dimension Table to show Place Area B for a Person, this joins to PersonCalendar

 

DimPlaceC

Dimension Table to show Place Area C for a Person, this joins to PersonCalendar

 

I have created a Matrix table and have two fields in Rows (One field from the table DimCustomer and one field from the table DimUser) and one field in the Values, for some reason though the Values are repeating for each Row, the field in Values is called Available and is a simple DAX formula of :

Available = SUM('PersonCalendar'[AvailableDayFlag])

 

Any reason why this is happening, I have read online about possibly using the DAX function SUMX or do an IF Statement including the function HASONEVALUE etc... but I want to make sure the measures do not go AWOL by drilling down to the next Dimension.

 

Any ideas?

 

Thanks

 

4 REPLIES 4
v-deddai1-msft
Community Support
Community Support

Hi @AvPowerBI ,

 

I can't write down the exact formula for your reference based on the information you gave me. Would you please show us some sample data and expected output or pbix file by onedrive for business?

 

I suggest you use ISINSCOPE in your formula, please refer to the similar post:  https://community.powerbi.com/t5/Desktop/Participation-inside-a-Hierarchy/td-p/1106616

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

Best Regards,

Dedmon Dai

Hi Dedmon

 

I have saved it to onedrive on the following link:

 

 
You will have to download the files (xlsx & pbix) to your C Drive in a folder called PowerBI if you needed to refresh the Report.
 
Thanks

Hi,

 

Anyone out there that has had this problem before?

 

Thanks

Hi Dedmon, Thanks for help so far, how do I attached the pbix to show you the issue? Or is there an alternative for you to be able to download the pbix file?

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.