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

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.

Reply
nandhinielango
Frequent Visitor

Equivalent to SameperiodLastYear

Hi All, 

 

I have a requirement to display data of Selected Year and Previous Year based on value in Slicer. 

I have Sales Table with Sales value,PeriodSK in form yyyymmdd(20170301) , FiscalYear as FY1617,FY1516 and FiscalQuarter Q1,Q2,Q3,Q4.

 

I have dimension period with PeriodSK in form yyyymmdd(20170301) , FiscalYear as FY1617,FY1516 and FiscalQuarter Q1,Q2,Q3,Q4. 

 

I need to achieve report such that if i select Q4, FY1617 in slicer - Then chart show display value of Q4, FY1516 and Q4,FY16/17.

Capture.PNG

 

Help me solve this without using SAMEPERIODLASTYEAR function.

1 ACCEPTED SOLUTION

Hi @nandhinielango

 

One way of doing it is to create a small "Comparatives" Table. For example

Quarter&YearComparatives
Q1 2017Q1 2016
Q2 2017Q2 2016
Q3 2017Q3 2016
Q4 2017Q4 2016


Using this table, you can then add "Comparative Quarter&Year" and "Comparative Values" in your Sales Table using LookUpValue function

 

Download this file here

Comparatives.jpg

 


Regards
Zubair

Please try my custom visuals

View solution in original post

4 REPLIES 4
v-huizhn-msft
Employee
Employee

Hi @nandhinielango,

FY1617,FY1516 in FiscalYear is text type? FY means from 2016 to 2017? Could you please share more details for further analysis?

Best Regards,
Angelia

Yes FY1617 is of text type. It indicates period from 2016 to 2017.

Hi @nandhinielango,


Please try the solution @Zubair_Muhammad posted, which is right. Please mark the right reply as answer if you have resolved your issue.

Thanks,
Angelia

Hi @nandhinielango

 

One way of doing it is to create a small "Comparatives" Table. For example

Quarter&YearComparatives
Q1 2017Q1 2016
Q2 2017Q2 2016
Q3 2017Q3 2016
Q4 2017Q4 2016


Using this table, you can then add "Comparative Quarter&Year" and "Comparative Values" in your Sales Table using LookUpValue function

 

Download this file here

Comparatives.jpg

 


Regards
Zubair

Please try my custom visuals

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.