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.
Dear Communtiy,
Please help me with the requirement below using dax
I need to show the data based on selected month.
For Example :If I select FY2020 I want the data from FY2019P08 to FY2020P08 (based ono fiscal qtr)
Below are the Sample data and the expected output
SalesAmount | TimeDimDate | Fiscal Fiscal Period | Fiscal Year
100 | 18-Jan-2019 | FY2019 P01 | FY2019
100 | 22-Feb-2019 | FY2019 P01 | FY2019
100 | 05-Mar-2019 | FY2019 P01 | FY2019
100 | 17-Apr-2019 | FY2019 P02 | FY2019
100 | 24-May-2019 | FY2019 P02 | FY2019
500 | 18-Jun-2019 | FY2019 P02 | FY2019
200 | 13-Jan-2020 | FY2019 P01 | FY2020
600 | 18-Feb-2019 | FY2019 P01 | FY2020
500 | 18-Mar-2019 | FY2019 P01 | FY2020
200 | 18-Apr-2020 | FY2019 P02 | FY2020
300 | 18-May-2020 | FY2019 P02 | FY2020
Expected Output : When I filter for May-2020 then the output will look like below
SalesAmount | TimeDimDate | Fiscal Fiscal Period | Fiscal Year
100 | 24-May-2019 | FY2019 P02 | 2019
500 | 18-Jun-2019 | FY2019 P02 | 2019
200 | 13-Jan-2020 | FY2019 P01 | 2020
600 | 18-Feb-2019 | FY2019 P01 | 2020
500 | 18-Mar-2019 | FY2019 P01 | 2020
200 | 18-Apr-2020 | FY2019 P02 | 2020
300 | 18-May-2020 | FY2019 P02 | 2020
Filter field would be Fiscal year
Is this possible?If so someone please help me get this.
I would be great if someone can help me as soon as possible.
Thanks inadvance
@Charu
I met a similar question yesterday, check the sample pbix I provided from this post:
Paul Zheng _ Community Support Team
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@Charu , Try like
Measure =
var _max = maxx(allselected('Date'),'Date'[Date])
var _min = date(year(_max),month(_max)-12,1)
return
calculate([measure],filter(All(DATE), Date[Date] >=_min && Date[Date] <=_max))
You may have to use 13 in place of 12
Hi @amitchandak
I tried your dax,unfortunately it din't give me the expected output
Hi @amitchandak
Sorry slight change in the requirement
We do have Fiscal_period and fiscal year in separate column which is FY2019 P01,FY2019 P12 and FY2020 P01 to FY2020 P12
Whether the logic you shared here will work for the filtering fiscal year 2020 then the data should populate from FY2019 P08 to FY2020 P08 (based on the fiscal qtr)
@Charu , Can use before slicer along with measure and check
@Charu , refer if this can help
https://www.youtube.com/watch?v=duMSovyosXE
@Charu , Or try this approach
https://www.youtube.com/watch?v=duMSovyosXE
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 |
---|---|
109 | |
98 | |
80 | |
64 | |
57 |
User | Count |
---|---|
145 | |
111 | |
92 | |
84 | |
66 |