Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
Hi,
I am trying to calculate last year sales using minimum line of dax code as below:
Dear, this would be the measure to create:
@Syndicate_Admin It shows the total sales amount when place on a card visual. I need to show only last year sales when place on a card visual.
Dear ,
Check this dax if it fits with you ,
Sales Last Year = CALCULATE(
[Sales],
FILTER(
ALL('Date (Sales Order)'),
'Date (Sales Order)'[Order Date] = MAX('Date (Sales Order)'[Order Date]) - 365
)
)
Change the table Name of the dates accordingly
Please consider accepting this as a solution !! Respect your KUDO !!
I appreciate your recognition and feel proud to have been able to assist you.
@bhelou Thanks for the suggestion but it doesn't give the correct value and also giving blank on the card visual.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
104 | |
69 | |
48 | |
41 | |
34 |
User | Count |
---|---|
164 | |
112 | |
62 | |
54 | |
38 |