Starting December 3, join live sessions with database experts and the Microsoft product team to learn just how easy it is to get started
Learn moreShape the future of the Fabric Community! Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions. Take survey.
Hii..
I have a requirement to calculate last year sales i.e if today date is 19/oct/2019 i need the last year sales from 01/Jan/2018 to 19/Oct/2018
I have used
Solved! Go to Solution.
It would certainly help if you show a sample of your tables. Assuming you are looking for a measure, try this in a card visual:
Measure = VAR First_ = DATE ( YEAR ( TODAY () ) - 1; 1; 1 ) VAR Last_ = EDATE ( TODAY (); -12 ) RETURN CALCULATE ( SUM ( Table1[Sales] ); Table1[Date] >= First_; Table1[Date] <= Last_ )
Please mark the question solved when done and consider giving kudos if posts are helpful.
Cheers
It would certainly help if you show a sample of your tables. Assuming you are looking for a measure, try this in a card visual:
Measure = VAR First_ = DATE ( YEAR ( TODAY () ) - 1; 1; 1 ) VAR Last_ = EDATE ( TODAY (); -12 ) RETURN CALCULATE ( SUM ( Table1[Sales] ); Table1[Date] >= First_; Table1[Date] <= Last_ )
Please mark the question solved when done and consider giving kudos if posts are helpful.
Cheers
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Check out the November 2024 Power BI update to learn about new features.
User | Count |
---|---|
93 | |
88 | |
83 | |
76 | |
49 |
User | Count |
---|---|
145 | |
140 | |
109 | |
68 | |
55 |