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.
Hello All!
I am trying to calculate a column of the subtotal of revenue by a year-month column:
Yr-Mo Revenue SubTotal Revenue
2021-01 1,000,000 1,000,000
2021-02 1,000,000 2,000,000
2021-03 1,000,000 3,000,000
2021-04 1,000,000 4,000,000
2021-05 1,000,000 5,000,000
I've tried a number of functions and always returns 5,000,000 for every row.
Thanks in advance!
Solved! Go to Solution.
Hi @Anonymous ,
Use the following measure:
revenuetotal = CALCULATE(SUM('Table'[Revenue]),FILTER(ALL('Table'),'Table'[Yr-Mo]<=MAX('Table'[Yr-Mo])))
then create a new column:
Wish it is helpful for you!
Best Regards
Lucien
Awesome! Thanks; didn't even know that was a thing!
@Anonymous
Try like this:
Sub Total Revenue =
CALCULATE(
SUM(Table3[Revenue ]),
FILTER( ALL(Table3[Yr-Mo ]), Table3[Yr-Mo ] <= MAX(Table3[Yr-Mo ] ))
)
⭕ Subscribe and learn Power BI from these videos
⚪ Website ⚪ LinkedIn ⚪ PBI User Group
@Fowmy thank you for the quick reply. It is returning the same value in the row for revenue.
@Anonymous
Can you share a screenshot of the result?
⭕ Subscribe and learn Power BI from these videos
⚪ Website ⚪ LinkedIn ⚪ PBI User Group
@Anonymous
Please find attached the file.
⭕ Subscribe and learn Power BI from these videos
⚪ Website ⚪ LinkedIn ⚪ PBI User Group
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 |
---|---|
111 | |
100 | |
80 | |
64 | |
58 |
User | Count |
---|---|
146 | |
110 | |
93 | |
84 | |
67 |