Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
srisiva55
Frequent Visitor

Generante two Fiscal year data ( Current Year and Previous year ) based on Current fiscal year.

I have one Requirement to use distinct Fiscal Year from Source Table and based on Source FY, want to generate New Table dynamically  like for ex: 2020-21 then needs to create 2019-20, 2020-21 etc just like below table. This table needs to generate dynammically . Can you please help me how to do this. Step by step instruction is helpful or pbix file also fine. 

 

 

 

FY.jpg

1 ACCEPTED SOLUTION
v-zhangti
Community Support
Community Support

Hi, @srisiva55 

 

You can try the following methods.

Table:

Table = UNION(SUMMARIZE(Source,Source[Source FY],"Index",1),SUMMARIZE(Source,Source[Source FY],"Index",2))

vzhangti_0-1683686221173.png

Last 2 Years = 
Var _minindex=CALCULATE(MIN('Table'[Index]),ALLEXCEPT('Table','Table'[Source FY]))
Return
IF([Index]=_minindex,LEFT([Source FY],4)-1&"-"&RIGHT([Source FY],2)-1,[Source FY])

vzhangti_1-1683686257878.png

Is this the result you expect?

 

Best Regards,

Community Support Team _Charlotte

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

View solution in original post

2 REPLIES 2
v-zhangti
Community Support
Community Support

Hi, @srisiva55 

 

You can try the following methods.

Table:

Table = UNION(SUMMARIZE(Source,Source[Source FY],"Index",1),SUMMARIZE(Source,Source[Source FY],"Index",2))

vzhangti_0-1683686221173.png

Last 2 Years = 
Var _minindex=CALCULATE(MIN('Table'[Index]),ALLEXCEPT('Table','Table'[Source FY]))
Return
IF([Index]=_minindex,LEFT([Source FY],4)-1&"-"&RIGHT([Source FY],2)-1,[Source FY])

vzhangti_1-1683686257878.png

Is this the result you expect?

 

Best Regards,

Community Support Team _Charlotte

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

Thank You!!  This solution works for me

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

Top Solution Authors