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
Anonymous
Not applicable

Data model mapping issue

Hi all,

 

i have two table 

 

Requirement Table:

Department IDNo of Employee Required
D15
D25
D35
D44
D56

 

Result Table:

DateEmployee ID ResultDepartment ID
5/5/2019E1SelectedD1
5/5/2019E2SelectedD1
5/5/2019E3SelectedD2
5/5/2019E4SelectedD3
5/5/2019E5SelectedD3
5/6/2019E6SelectedD4
5/6/2019E7SelectedD5
5/6/2019E8SelectedD2
5/6/2019E9SelectedD3
5/6/2019E10SelectedD3

 

I have mapped these two tables by Department ID

 

I have a Date filter

 

when I select Date: 5/5/2019

 

it shows Result like

Department IDNo of Employee RequiredNo of Employee Selected
D152
D251
D352

 

but I want to show all requirement Details 

 

Expected Result

Department IDNo of Employee RequiredNo of Employee Selected
D152
D251
D352
D440
D560
1 ACCEPTED SOLUTION
v-xicai
Community Support
Community Support

Hi  @Anonymous ,

 

Based on the Cross filter direction of the relationship between the two table as Single instead of Both, you can create measure like DAX below, then tick on the " Show items with no data " of Department ID when display result in table visual .

 

No of Employee Selected = CALCULATE(COUNT(Result[Employee ID]),FILTER(ALLSELECTED(Result),Result[Department ID]=MAX(Requirement[Department ID])))

 

2.png3.png

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Best Regards,

Amy

 

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

View solution in original post

3 REPLIES 3
v-xicai
Community Support
Community Support

Hi  @Anonymous ,

 

Based on the Cross filter direction of the relationship between the two table as Single instead of Both, you can create measure like DAX below, then tick on the " Show items with no data " of Department ID when display result in table visual .

 

No of Employee Selected = CALCULATE(COUNT(Result[Employee ID]),FILTER(ALLSELECTED(Result),Result[Department ID]=MAX(Requirement[Department ID])))

 

2.png3.png

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Best Regards,

Amy

 

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

Anonymous
Not applicable

Thanks, v-xicai

 

is it possible to show the total value? 

 

Screenshot_5.png

Anonymous
Not applicable

Hi v-xicai,

 

Thanks for your response.

In Result table, Result column I have many categorizations(Rejected, Selected). Particularly I want to get 'selected' count only.

 

Result table

DateEmployee ID ResultDepartment ID
05-05-2019E1SelectedD1
05-05-2019E2SelectedD1
05-05-2019E3RejectedD2
05-05-2019E4RejectedD3
05-05-2019E5SelectedD3
05-06-2019E6SelectedD4
05-06-2019E7SelectedD5
05-06-2019E8SelectedD2
05-06-2019E9SelectedD3
05-06-2019E10SelectedD3

 

 

how to  alter this dax query 

No of Employee Selected = CALCULATE(COUNT(Result[Employee ID]),FILTER(ALLSELECTED(Result),Result[Department ID]=MAX(Requirement[Department ID])))

 

 

 

Thanks in Advance

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.