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.
Maybe there is a easy way to add this measure. I've been trying to increase the amount on every row from 2020 onwards (every amount will be added to the previous result). I've been trying different measures but cannot get the right results.
The result I've been looking for would be something like this table:
Date | - Amount | - Calc amount |
01-01-2019 | - 1000 | 1000 |
02-01-2019 | - 2000 | 2000 |
01-01-2020 | - 1000 | 1000 |
02-01-2020 | - 2000 | 3000 |
03-02-2020 | - 2000 | 5000 |
Solved! Go to Solution.
Hi @Anonymous ,
Based on your description, you can create a measure as follows.
calculated_measure =
var x1=CALCULATE(
SUM('Table1'[- Amount]),
FILTER(ALL('Table1'),'Table1'[Date].[Year]=2020&&'Table1'[Date]<=MAX('Table1'[Date])))
return
IF(MAXX('Table1','Table1'[Date].[Year])=2020,x1,MAX('Table1'[- Amount]))
Result:
Hope that's what you were looking for.
Best Regards,
Yuna
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Thanks for the help, this measure helped
Hi @Anonymous ,
Based on your description, you can create a measure as follows.
calculated_measure =
var x1=CALCULATE(
SUM('Table1'[- Amount]),
FILTER(ALL('Table1'),'Table1'[Date].[Year]=2020&&'Table1'[Date]<=MAX('Table1'[Date])))
return
IF(MAXX('Table1','Table1'[Date].[Year])=2020,x1,MAX('Table1'[- Amount]))
Result:
Hope that's what you were looking for.
Best Regards,
Yuna
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Anonymous ,
You can add a column in Power Query with this code:
if Date.Year([Date]) >= 2020 then [Amount] + 1000 else [Amount]
Pete
Proud to be a Datanaut!
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 |
---|---|
106 | |
94 | |
75 | |
62 | |
50 |
User | Count |
---|---|
147 | |
106 | |
104 | |
87 | |
61 |