Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Hi, I have to calculate TotaYTD but the companies had different fiscal years, so I have to change the TotalYTD parameter for each one of them, for example:
Country - Company - Store - Sales
USA - Company1 - ST1 - 1000 (the fiscal year ends on 31/12)
USA - Company2 - ST2 - 500 (the fiscal year ends on 31/1)
Canada - Company4 - ST5 - 10 (the fiscal year ends on 31/12)
.....
The measure I was using was the traditional Sales YTD = TOTALYTD([SALES],date[day],'31/01') but this doesnt take into account the different fiscal years.
I have an auxiliary table with the fiscal years for each company, so the problem is, how can I calculate the YTD at the company level to be able to change the fiscal year depending the company?
thanks a lot.
Hi @Anonymous ,
If you have a table like this, you can add the [Company] column to the slicer and filter through the slicer.
In doing so, you only need to create a measure, not for each company.
Best regards,
Lionel Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@Anonymous Time "intelligence" starts to get wonky if you stray outside the lines. You may find this helpful - https://community.powerbi.com/t5/Community-Blog/To-bleep-With-Time-Intelligence/ba-p/1260000
Also, see if my Time Intelligence the Hard Way provides a different way of accomplishing what you are going for.
https://community.powerbi.com/t5/Quick-Measures-Gallery/Time-Intelligence-quot-The-Hard-Way-quot-TITHW/m-p/434008
@Anonymous , totalytd, and datesytd do not allow a dynamic value for year-end this means you have to create a measure like. But this will company in the context
Switch( true() ,
max([Company]) = "Company1" ,CALCULATE(SUM(Sales[Sales Amount]),DATESYTD('Date'[Date],"12/31")),
max([Company]) = "Company2" ,CALCULATE(SUM(Sales[Sales Amount]),DATESYTD('Date'[Date],"1/31")),
max([Company]) = "Company3" ,CALCULATE(SUM(Sales[Sales Amount]),DATESYTD('Date'[Date],"12/31")),
)
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
| User | Count |
|---|---|
| 104 | |
| 82 | |
| 71 | |
| 50 | |
| 46 |