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.
I have custom field in my slicer for FY19,FY20,F21 coming from the date table and I need to use SamePeriodLastYear in the calculation, but keep filtering by my slicer above.
Because I'm not using the date field on the slicer the calculation isn't working.
Any ideas how to fix?
please see below :
Thanks
Solved! Go to Solution.
Hi, @Anonymous
Just in case, please check if your DimDateTable is assigned as a date-table.
Hi, My name is Jihwan Kim.
If this post helps, then please consider accept it as the solution to help other members find it faster.
If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.
Hi, @Anonymous
Just in case, please check if your DimDateTable is assigned as a date-table.
Hi, My name is Jihwan Kim.
If this post helps, then please consider accept it as the solution to help other members find it faster.
If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.
Hi,
Thanks for that.
The table actually wans't assiged as Data because I had one gap between the dates.
I remove the first row which was the gap from 01/01/1900 then Assiged again as date table and now it's working.
Thanks a lot.
@Anonymous , I am not sure about the need on hasonevalue here.
isfiltered or isinscope are better alternates
Invoiced Revenue PY =
var result =
CALCULATE( [Invoiced Revenue],
SAMEPERIODLASTYEAR(DimDate[Date])
)
RETURN
IF(
isinscope(DimDate[Financial_Year_short]),
result, 0
)
or simply use
Invoiced Revenue PY =
CALCULATE( [Invoiced Revenue],
SAMEPERIODLASTYEAR(DimDate[Date])
)
https://powerpivotpro.com/2013/03/hasonevalue-vs-isfiltered-vs-hasonefilter/
https://www.kasperonbi.com/use-isinscope-to-get-the-right-hierarchy-level-in-dax/
Other than there can a few other reasons Time intelligence can fail
Check https://www.youtube.com/watch?v=OBf0rjpp5Hw
Hi,
Thanks for getting back to me.
But still not working. Forget about the is in scope, if I only use the sameperiod last year also is not working.
For some reason the calculation only works when I the column with Financial_year_short is not in the visual.
See below:
When I aggregate with the column I need, it's weird because it shows me the total only.
Now without the Financial Year Short (column I need to aggregate the PY values)
The issue is when I bring the Financial_year_short that I need.
This columns is a simple column from the date table saying which fiscal year is the date.
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 |
---|---|
114 | |
100 | |
83 | |
70 | |
61 |
User | Count |
---|---|
149 | |
114 | |
107 | |
89 | |
67 |