Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and a 50 percent discount on exams.
Get startedEarn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Dear community,
I'm currently struggling with the following problem. I've got a salestable with amounts and invoicedates. I've also got another table that always contains one date which I transferred into a date table. Now I want to calculate the total amount but only for the period of a year previous to the date in the date table. I tried it as follows:
Solved! Go to Solution.
@DLU Maybe:
Measure =
VAR __Date = MAX('Dates'[Date])
VAR __StartDate = DATE(YEAR(__Date)-1,MONTH(__Date),DAY(__Date))
VAR __Table = FILTER('CUSTINVOICETRANS',[InvoiceDate]>=__StartDate && <=__Date)
RETURN
SUMX(__Table,[Total costprice revenue])
You may find this helpful - https://community.powerbi.com/t5/Community-Blog/To-bleep-With-Time-Intelligence/ba-p/1260000
Also, see if my Time Intelligence the Hard Way provides a different way of accomplishing what you are going for.
https://community.powerbi.com/t5/Quick-Measures-Gallery/Time-Intelligence-quot-The-Hard-Way-quot-TIT...
@DLU Maybe:
Measure =
VAR __Date = MAX('Dates'[Date])
VAR __StartDate = DATE(YEAR(__Date)-1,MONTH(__Date),DAY(__Date))
VAR __Table = FILTER('CUSTINVOICETRANS',[InvoiceDate]>=__StartDate && <=__Date)
RETURN
SUMX(__Table,[Total costprice revenue])
You may find this helpful - https://community.powerbi.com/t5/Community-Blog/To-bleep-With-Time-Intelligence/ba-p/1260000
Also, see if my Time Intelligence the Hard Way provides a different way of accomplishing what you are going for.
https://community.powerbi.com/t5/Quick-Measures-Gallery/Time-Intelligence-quot-The-Hard-Way-quot-TIT...
Dear Greg,
Thank you for you response. I had to adjust it a little bit but that was probably due to the fact that by datetable is a little bit strange because it only contains one value, but the output is now correct!
With kind regards,
Diana
User | Count |
---|---|
91 | |
73 | |
68 | |
63 | |
55 |
User | Count |
---|---|
99 | |
88 | |
73 | |
60 | |
58 |