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.
Hi there!
I have 2 tables of cats. I would like to create a sum of cat amounts. The caveat is that when there is a value in the override table for a date, that value is summed instead of the value in the cats table.
Ie total cats amount = (4+4+4)+(1+2+3+4) = 22
Table Cats | ||
Date | Cat Amount | Cat Cost |
6/30/2018 | 4 | 32 |
7/1/2018 | 4 | 34 |
7/2/2018 | 4 | 44 |
7/3/2018 | 3 | 22 |
7/4/2018 | 6 | 35 |
7/5/2018 | 2 | 21 |
7/6/2018 | 4 | 45 |
Table Cat Override | ||
Date | Cat Amount | Cat Cost |
7/3/2018 | 1 | 13 |
7/4/2018 | 2 | 22 |
7/5/2018 | 3 | 33 |
7/6/2018 | 4 | 66 |
Solved! Go to Solution.
Hi @Anonymous
You may try to create a measure as below:
Measure =
SUMX (
'Cats',
IF (
RELATED ( 'Cat Override'[Date] ) <> BLANK (),
RELATED ( 'Cat Override'[Cat Amount] ),
Cats[Cat Amount]
)
)
Regards,
Cherie
Hi @Anonymous
You may try to create a measure as below:
Measure =
SUMX (
'Cats',
IF (
RELATED ( 'Cat Override'[Date] ) <> BLANK (),
RELATED ( 'Cat Override'[Cat Amount] ),
Cats[Cat Amount]
)
)
Regards,
Cherie
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
107 | |
94 | |
77 | |
63 | |
50 |
User | Count |
---|---|
147 | |
106 | |
104 | |
87 | |
61 |