Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
Hi,
I have rather a complex problem I'm hoping someone can help me make simple ...
I have a calendar table that will either run by Calendar Year of Fiscal Year (July to June) depending on a parameter that switchs between CY and FY - so there will only ever be one version of the table, the parameter will adjust the start date and calendar type.
I want to be able compare the cumulative sum of a field YEAR TO DATE, regardless of whether it's a CY or FY calendar:
My calendar table had all the usual fields - date, month, year, etc. Obviously when the dates go from 30/06/2018 to 01/07/2018 to years change from 2018 to 2019.
Am I right in thinking SAMEPERIODLASTYEAR only works on Calendar Year and not Fiscal Year?
I really don't know how I should approach this. Does anyone have any ideas?
Thanks,
MarkJames
Solved! Go to Solution.
No problem. I'm sure there's a smarter way to do this but it's working and that's all I wanted.
I created a calculated column that returned the MAX of the YEAR column - so I could work out the current year and that it would be dynamic as the data moved through the years:
Hi @Anonymous,
Have you solved your problem?
If you have solved, could you please share your solution or always accept the replies making sense as solution to your question so that people who may have the same question can get the solution directly.
If you still need help, please share some data sample and your desired output so that we could help further on it.
Best Regards,
Cherry
No problem. I'm sure there's a smarter way to do this but it's working and that's all I wanted.
I created a calculated column that returned the MAX of the YEAR column - so I could work out the current year and that it would be dynamic as the data moved through the years:
Hi @Anonymous,
For your scenario, you'd better not use SAMEPERIODLASTYEAR fucntions.
You could have a reference of this similar thread which has been solved.
If you still need help, please share some data sample which could reproduce your scenario and your desired output so that we could help further on it.
Best Regards,
Cherry
User | Count |
---|---|
141 | |
113 | |
104 | |
78 | |
64 |
User | Count |
---|---|
136 | |
125 | |
107 | |
70 | |
61 |