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,
I have two tables :
A.
Society | Target |
A | 100 |
B | 200 |
C | 1000 |
D | 1200 |
B.
Date | Society | Amount |
29/02/2020 | A | 10 |
31/01/2020 | B | 12 |
29/02/2020 | C | 20 |
31/01/2020 | D | 10 |
29/02/2020 | A | 5 |
31/01/2020 | B | 10 |
29/02/2020 | C | 8 |
31/01/2020 | D | 12 |
I would like to add a new column on table A that summarizes the amounts (by society), but only for 29/02/2020. Thus, it would look like this :
A.
Society | Target | Amount |
A | 100 | 15 |
B | 200 | |
C | 1000 | 28 |
D | 1200 |
I took a few months off power bi and lost all my basics...
Can someone help me with this?
THanks in advance!
ANa
Solved! Go to Solution.
Hi @AFra ,
You can try this code for calculated column:
HI @AFra,
Did this date filter dynamic base on your filter/slicer? If this is a case, I'd like to suggest you write a measure formula to calculate. (current calculated column/table not able to interact with filter/slicer dynamically)
Measure =
CALCULATE (
SUM ( TableB[Amount] ),
FILTER ( ALLSELECTED ( TableB ), [Society] IN VALUES ( TableA[Society] ) ),
VALUES ( TableB[Date] )
)
Regards,
Xiaoxin Sheng
Hi @AFra ,
You can try this code for calculated column:
It works nicely, thanks a lot!
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 |
---|---|
109 | |
95 | |
77 | |
65 | |
53 |
User | Count |
---|---|
144 | |
105 | |
102 | |
89 | |
63 |