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

Get inspired! Check out the entries from the Power BI DataViz World Championships preliminary rounds and give kudos to your favorites. View the vizzies.

Reply
Rohitb
Helper I
Helper I

Extrapolation of data

Source Table :

Id                  DOJ             DOR                Level        Rank Date                    
1            13/08/2010                                  10          1/10/2023
2            26/12/2022      12/12/2023          9         
3            22/09/2023                                   8           1/08/2023
4            12/11/2023      30/11/2023          9
5            12/01/2020      05/03/2022          12


Output I need ( I need to extrapolate the data from Fiscal year start till date based on DOJ )

Requirements: I need to derive 4 columns Period,Id,Level & Tenure
Where Period values would be from Sep-23,Oct-23......Aug-24 (current fiscal year months) 

Id would be those values in the source table whose DOJ falls in that period

Level is calculated based on Rank date (in case if the rank date is greater than the period month end then Level = Level - 1 else same Level )

Tenure is Period - DOJ for the corresponding id.

 

Period      Id               Level                                                                    Tenure
Sep-23       1             10-1 =9 ( as rank date > Sep 23)                         Sep-23 - DOJ
Sep-23       2             9
Sep-23       3             8   ( as rank date < sep 23, keep it as is)
Oct-23       1             10                                                       Oct-23 - DOJ
Oct-23       2              9
Oct-23       3             8
Nov-23       1            10
Nov-23       2             9  
Nov-23       3             8
Nov-23       4             9
Dec-23       1             10
Dec-23       2             9   
Dec-23       3             8


How to acheive this extrapolation output as a table in PowerBI ?

4 REPLIES 4
Rohitb
Helper I
Helper I

Hello @v-yilong-msft 

Thankyou for your response.
I need to derive the 1st table as stated by user @NandanHegde .
I am not sure how to do that

Hi @Rohitb ,

Do you mean converting to the first table based on the second table? Can you provide me with more information on this? As it stands I can't see any obvious correlation between the two tables.

 

 

Best Regards

Yilong Zhou

NandanHegde
Super User
Super User

@v-yilong-msft I guess the ask from the user is to generate the 2 table that you have already created.
How to extrapolate to the below table from the source seems to be his ask ? and also derive other columns

NandanHegde_0-1714984017474.png

I am not sure, but we can create a calendar table and then use cross join filter condition to derive it but I might be wrong here




----------------------------------------------------------------------------------------------
Nandan Hegde (MSFT Data MVP)
LinkedIn Profile : www.linkedin.com/in/nandan-hegde-4a195a66
GitHUB Profile : https://github.com/NandanHegde15
Twitter Profile : @nandan_hegde15
MSFT MVP Profile : https://mvp.microsoft.com/en-US/MVP/profile/8977819f-95fb-ed11-8f6d-000d3a560942
Topmate : https://topmate.io/nandan_hegde
Blog :https://datasharkx.wordpress.com
v-yilong-msft
Community Support
Community Support

Hi @Rohitb ,

I create two tables as you mentioned.

vyilongmsft_0-1714974929323.png

vyilongmsft_1-1714974975423.png

Then I create two calculated columns.

Level =
VAR RankDate =
    SELECTEDVALUE ( T1[Rank Date] )
VAR PeriodEndDate =
    EOMONTH ( [Period], 0 )
RETURN
    IF (
        RankDate > PeriodEndDate,
        RELATED ( T1[Level] ) - 1,
        RELATED ( T1[Level] )
    )

vyilongmsft_2-1714975209087.png

Tenure = DATEDIFF(RELATED(T1[DOJ]), [Period], MONTH)

vyilongmsft_3-1714975335819.png

 

 

 

Best Regards

Yilong Zhou

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

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

Check out the February 2025 Power BI update to learn about new features.

March2025 Carousel

Fabric Community Update - March 2025

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