Forum Discussion
How to solve this problem ?..
Hello Everyone
I have a situation here,Request you all to help me with the Solution
4 Replies
- Mahesh0016Super User
ravirayala4252
Create a Relationship and Write Dax for your solutions.
ravirayala4252 Please share your Dataset for solutions. Thank You!!- ravirayala4252Helper I
Hi Mahesh0016
Here is the Sample Dataset as you want, please suggest me the Possible Solutions.I need a Dax measure which result the following 3 conditions. 1. Calculate Sum actual Activity in table B based on matching ID from table A. 2. Calculate Sum actual Activity in table B by not Matching ID & matching ITEMS from table A. 3. Calculate Sum of actual Activity in table B by not Matching ID & not matching ITEM from table A. A single measure which results all the above conditions?. Table A:
ID ITEM LOCATION Planned Activity Type 1 Null a 10 Solid 1 Null a 5 Solid 2 Null b 4 Solid 2 Null c 6 Solid 3 Null d 7 Solid 3 Null e 8 Solid 4 Null f 11 Solid 4 Null g 12 Solid Null A h 13 Tentative Null B i 9 Tentative Null C j 4 Tentative Null D k 5 Tentative Null E l 6 Tentative Null F m 7 Tentative Null G n 8 Tentative Null H o 9 Tentative 50 Unplanned Table B ID ITEM LOCATION Actual Activity 1 A a 10 1 B a 5 2 C b 4 2 C c 6 3 Null d 7 3 Null e 8 4 Null f 11 4 Null g 12 5 D h 13 6 D i 9 6 Null j 4 7 Null k 5 8 Null l 6 8 Null m 7 9 E n 8 9 E o 9 10 F l 10 10 Null m 11 11 Null l 12 12 Null g 11 13 Null h 12 13 Null g 13 14 Null h 11 14 Null m 12 - ravirayala4252Helper I
Hai Mahesh0016
Please let me know if you have the solution for this problem !...
- Mahesh0016Super User
Hello ravirayala4252
> Total Activity :Total Activity = SUM('Table B'[Actual Activity])> 1. Calculate Sum actual Activity in table B based on matching ID from table A.matching ID from table A =
CALCULATE (
[Total Activity],
FILTER (
'Table B',
'Table B'[ID] = LOOKUPVALUE ( 'Table A'[ID], 'Table A'[ID], 'Table B'[ID] )
)
)> 2. Calculate Sum actual Activity in table B by not Matching ID & matching ITEMS from table A.
matching ITEMS from table A =
CALCULATE (
[Total Activity],
FILTER (
'Table B',
'Table B'[ID] <> LOOKUPVALUE ( 'Table A'[ID], 'Table A'[ID], 'Table B'[ID] )
&& 'Table B'[ITEM] = LOOKUPVALUE ( 'Table A'[ITEM], 'Table A'[ID], 'Table B'[ID] )
)
)> 3. Calculate Sum of actual Activity in table B by not Matching ID & not matching ITEM from table A.A single measure which results all the above conditions?.
Not matching from table A =
CALCULATE (
[Total Activity],
FILTER (
'Table B',
'Table B'[ID] <> LOOKUPVALUE ( 'Table A'[ID], 'Table A'[ID], 'Table B'[ID] )
&& 'Table B'[ITEM] <> LOOKUPVALUE ( 'Table A'[ITEM], 'Table A'[ID], 'Table B'[ID] )
)
)ravirayala4252 I hope this hepls you! Thank You!!