Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
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")),
)
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
112 | |
97 | |
80 | |
69 | |
59 |
User | Count |
---|---|
150 | |
119 | |
104 | |
87 | |
67 |