Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more
Good morning
I am new here.
I calculated the total amount of sales. then I created variables to find the sales of the past year. and make the formula dynamic.
VAR sells =
CALCULATE ( SUM ( BookingLines[LineSell] ) )
VAR OGGI =
( TODAY () )
VAR AnnoScorso =
YEAR ( TODAY () ) - 1
RETURn CALCULATE (
SUM ( BookingLines[LineSell] ),
(
BookingLines[LineCreationDate]
<= ( DATE ( AnnoScorso, MONTH ( OGGI ), DAY ( OGGI ) ) ) ) )
now I have to ensure that the sales for the year 2022 only take into account the reservations for the year 2022 with the 'BookingLine'[startdate] filter
how can i proceed?
Hi @guillaume17
try to rewrite your measure as following
Did I answer your question? Kudos appreciated / accept solution!
Proud to be a Super User!
hi @some_bih I copied your formula but at table level, the column remains empty. I want this year's sales to only take into account bookings from last year using the filter 'Bookinglines[stardate].
Hi @guillaume18
Model is not available, so please try below.
VAR sells =
CALCULATE ( SUM ( BookingLines[LineSell] ) )
VAR OGGI =
( TODAY () )
VAR AnnoScorso =
YEAR ( TODAY () ) - 1
RETURn CALCULATE (
SUM ( BookingLines[LineSell] ),
AnnoScorso)
Proud to be a Super User!
i have to use the filter 'Bookinglines[stardate].
Hi @guillaume18 I need to see pbi file to support you somehow.
Proud to be a Super User!
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 9 | |
| 5 | |
| 4 | |
| 4 | |
| 3 |
| User | Count |
|---|---|
| 13 | |
| 9 | |
| 9 | |
| 9 | |
| 8 |