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,
I'm looking for some help trying to calculate the total billed amount for either the first or second half of the year depending on the date. i.e. if today is April 1 then calculate the billed amount for months 1 to 6 (regardless if no data exists for Apr/May/Jun) and if July 1 then calculate amounts for months 7 to 12. I do have a calendar table created however I can't seem to get my head around the syntax to put it together.
Any help would be appreciated!
Thank you!
Solved! Go to Solution.
@Anonymous - Please try the following:
1. If you don't have a column for semesters (half-years) in your calendar table, add it.
2. Create a measure similar to this:
Your Sum Measure = var current_semester = CALCULATE(VALUES('Date'[Semester]), 'Date'[Date] = TODAY()) return CALCULATE(SUM(YourTable[YourColumn]), 'Date'[Semester] = current_semester)
Hope this helps,
Nathan
@Anonymous - Please try the following:
1. If you don't have a column for semesters (half-years) in your calendar table, add it.
2. Create a measure similar to this:
Your Sum Measure = var current_semester = CALCULATE(VALUES('Date'[Semester]), 'Date'[Date] = TODAY()) return CALCULATE(SUM(YourTable[YourColumn]), 'Date'[Semester] = current_semester)
Hope this helps,
Nathan
Thanks Natel, it worked perfectly.
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 |
---|---|
114 | |
100 | |
78 | |
75 | |
52 |
User | Count |
---|---|
144 | |
109 | |
108 | |
88 | |
61 |