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.
See above for a Date table I built within my report. I am trying to do a measure to calculate total units by fiscal year 2022 and 2021.
This measure works but in doing so I would be required to edit the report yearly.
Any idea how to make this dynamic? Tried this measure but it returned the total for ALL fiscal years not just 2022.
Thanks in advance!
Solved! Go to Solution.
Thanks for replies.
I think I just got this to work on my own. See below for CY and PY measures. I didnt have to create another table either.
CY Units = CALCULATE(SUM(SalesSummary[Units]),FILTER('Date','Date'[Fiscal Year]=MAX('Date'[Fiscal Year])))
PY Units = CALCULATE(SUM(SalesSummary[Units]),FILTER('Date','Date'[Fiscal Year]=MAX('Date'[Fiscal Year])-1))
Thanks for replies.
I think I just got this to work on my own. See below for CY and PY measures. I didnt have to create another table either.
CY Units = CALCULATE(SUM(SalesSummary[Units]),FILTER('Date','Date'[Fiscal Year]=MAX('Date'[Fiscal Year])))
PY Units = CALCULATE(SUM(SalesSummary[Units]),FILTER('Date','Date'[Fiscal Year]=MAX('Date'[Fiscal Year])-1))
Hi @IamTDR ,
Does it work with this measure?
CY Units = VAR _maxYear = MAX ('Date'[Fiscal Year] ) RETURN CALCULATE ( SUM ( SalesSummary[Units] ), FILTER ( 'Date', 'Date' [Fiscal Year] = _maxYear ) )
/Tom
https://www.tackytech.blog/
https://www.instagram.com/tackytechtom/
Did I answer your question❓➡️ Please, mark my post as a solution ✔️ |
Also happily accepting Kudos 🙂 |
Feel free to connect with me on LinkedIn! |
#proudtobeasuperuser |
Yup. Seems this measure works as well. Thanks
Hi @IamTDR
Please try this
Create New Table = DISTINCT('Calender'[Fiscal Year])
Make relationship witn your calender table Fiscal Year to Fiscal Year
Now do measure
= VAR _FY = SELECTEDVALUE('New Table'[Fiscal Year])
RETURN
CALCULATE(SUM(SalesSummary[Units]),_FY)
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 |
---|---|
107 | |
98 | |
77 | |
66 | |
53 |
User | Count |
---|---|
144 | |
104 | |
100 | |
86 | |
64 |