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, in one table I have all sales, I can compare sales from selected year and previous year, my problem is with actual year, I want to summerize previous year sales only to the same date as today but last year:
In this example I want sales last year until november, and when I will have december sales, I wants only too last year december sales.
Thanks
sdionne
Solved! Go to Solution.
Hi,
Try this
=IF(ISBLANK(Ventes[Ventes]),BLANK(),CALCULATE(Ventes[Ventes];DATESYTD(Calendrier[Date];"30/09"))
Hope this helps.
Hi @sdionne
What formula are you using for your measures?
I had some success with the following:
Ventes Total YTD = TOTALYTD(SUM('Sales'[Ventes]),'Dates'[Date]) Ventes Total Annee Pre YTD = TOTALYTD(SUM('Sales'[Ventes]),SAMEPERIODLASTYEAR('Dates'[Date]))
Hi Phil, I tested yoyr formulas and it's not working for me.
My formulas are:
Ventes Total YTD = CALCULATE(Ventes[Ventes];DATESYTD(Calendrier[Date];"30/09"))
Ventes Total Année Précédente YTD = CALCULATE(Ventes[Ventes Année Précédente];DATESYTD(Calendrier[Date];"30/09"))
Please note I calculate according to fiscal year from oct. to sept.
Thanks
Sylvain
Hi,
You are missing the SUM function. Try this
=CALCULATE(SUM(Ventes[Ventes]);DATESYTD(Calendrier[Date];"30/09"))
Also, ensure that in your visual, you draf Year/months/days from the Calendar table.
Hi, it was not clear but Ventes[Ventes] is measure and is already a sum.
And the Date is in the view
Again this is what I have:
And what I want:
Thanks
Sylvain
Hi @sdionne,
Please make sure that you dragged [Date] field from calendar table, rather than your source table 'Ventes'.
Regards,
Yuliana Gu
Hi,
Try this
=IF(ISBLANK(Ventes[Ventes]),BLANK(),CALCULATE(Ventes[Ventes];DATESYTD(Calendrier[Date];"30/09"))
Hope this helps.
Thanks!
Sylvain
You are welcome.
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 |
---|---|
100 | |
72 | |
44 | |
38 | |
30 |
User | Count |
---|---|
156 | |
92 | |
62 | |
44 | |
41 |