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 Team,
I have following issue:
I've amount table and detail table. I want a measure to get sum of all the amount in a card.
I used following dax:
date1 | Employee | age |
01/01/19 | a | 31 |
02/01/19 | b | 32 |
03/01/19 | c | 45 |
04/01/19 | d | 24 |
05/01/19 | e | 32 |
11/21/19 | f | 21 |
dates | Amount |
01/01/19 | 100 |
02/01/19 | 121 |
03/01/19 | 212 |
04/01/19 | 32 |
04/01/19 | 134 |
Solved! Go to Solution.
Hi @Anonymous ,
Assuming that you have created the relationship between the two tables.
Please try the measure below.
Measure = CALCULATE ( SUM ( 'Table 2'[Amount] ), FILTER ( ALLSELECTED ( 'Table'[date1] ), 'Table'[date1] <= MAX ( 'Table'[date1] ) ) )
Here is the output.
More details, you could refer to my attachment.
Best Regards,
Cherry
Hi @Anonymous ,
Assuming that you have created the relationship between the two tables.
Please try the measure below.
Measure = CALCULATE ( SUM ( 'Table 2'[Amount] ), FILTER ( ALLSELECTED ( 'Table'[date1] ), 'Table'[date1] <= MAX ( 'Table'[date1] ) ) )
Here is the output.
More details, you could refer to my attachment.
Best Regards,
Cherry
Could you not just modify your slicer?
Have you tried
VAR enddate = max(details[dates])
I done something like this
https://medium.com/chandakamit/power-bi-comparing-data-across-date-ranges-36be49b68613
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 |
---|---|
97 | |
96 | |
81 | |
74 | |
66 |
User | Count |
---|---|
129 | |
106 | |
106 | |
86 | |
72 |