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
Mourt
Helper I
Helper I

Replacing blanks with 0 issue and data modeling issue

Hi everyone,

Unfortunatlry I wont be able to upload a sample pbix, but I will try to explain

The first table that I have is called Location Table and it has 3 locations 

Location_IDLocation_Title
1Location 1
2Location 2
3Location 3



the Second table is the users table, each user belongs to atleast 1 location and could also be linked with multiple locations.

User_IDLocation_IDUser_name
1111AAA
1112AAA
1121BBB
1132CCC
1141DDD
1143DDD
1152EEE
1161FFF
1171GGG
1182HHH
1192III
1193III
1201JJJ
1202JJJ
1203JJJ



The third table is called the audits table, each user could be audited in his location.

Audit_IDUser_IDLocation_ID
12341111
12351121
12361143
12371152
12381171
12401193
12411202
12421111
12431121
12461171
12481193
12491202
12501121
12511111
12521121
12531193
12541203
12551143
12561111
12571143
12581203
12591193
12601202



My First issue:
I created a mtrix where it shows the 3 locations with a drill down to users that are link with the location. I used show items with no data and all users are showing but the ones with no audits are not showing, I tried to add +0 to the measure or If(ISBLANK but when I do that all users show under the Location whether they are linked to it or not.

My Second issue:
The users that are linked to multiple locations are showing the same number of audits accross all locations, eventhough they could have been audited in only one of their locations, Im trying to figure out a way to show the number of audits based on the User and the location together not only the user.


Data Model:
Screenshot 2022-08-06 180243.png

Expected Result

ignore the last columnignore the last column

 


Thank you and appreciate your support


1 ACCEPTED SOLUTION
Mourt
Helper I
Helper I

Combine the Location ID and User ID on your Users table by creating a column using concat function or (&) operator. Do the same in Audits table. 

View solution in original post

4 REPLIES 4
Mourt
Helper I
Helper I

Combine the Location ID and User ID on your Users table by creating a column using concat function or (&) operator. Do the same in Audits table. 

Mourt
Helper I
Helper I

Up?

TomMartens
Super User
Super User

Hey @Mourt ,

 

please take the time and prepare some sample data, that still reflects your data model. Paste the data into your post and describe the expected result based on the sample data you provide.

 

Regards,

Tom



Did I answer your question? Mark my post as a solution, this will help others!

Proud to be a Super User!
I accept Kudos 😉
Hamburg, Germany

Hi @TomMartens , 

thank you for your reply, I have updated the post and added the data samples

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.