cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted

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

Accepted Solutions
Community Support Team
Community Support Team

Re: Data model mapping issue

Hi  @vengadeshpalani ,

 

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
Community Support Team
Community Support Team

Re: Data model mapping issue

Hi  @vengadeshpalani ,

 

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

Anonymous
Not applicable

Re: Data model mapping issue

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

Re: Data model mapping issue

Thanks, v-xicai

 

is it possible to show the total value? 

 

Screenshot_5.png

Helpful resources

Announcements
Exclusive LIVE Community Event #3 – Ask Arun Anything

Exclusive LIVE Community Event #3 – Ask Arun Anything

Join us in the third Triple A event!

Meet the 2020 Season 1 Power BI Super Users!

Meet the 2020 Season 1 Power BI Super Users!

It’s the start of a new Super User season! Learn all about the new Super Users and brand-new tiered recognition system.

January 2020 Community Highlights

January 2020 Community Highlights

Make sure you didn't miss any of the things that happened in the community in January!

Top Solution Authors
Top Kudoed Authors