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

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

Reply
pauljohnson
Frequent Visitor

I want to show current row of data and then show what has changed based on an effective from date

Hi,

 

I am trying to show when changes were made to a set of data and what the changes were, i have each line i need in a table similar to the below and i want to only show rows where a new effective from date has been uploaded in the last 14 days, i have this by filtering on the relative date on my visualisation, but i now want to show the corresponding row, that was the previous date it was last changed. Hope i am making sense.

 

My expected outcome would be to only show the top 6 rows as the 30/08/2021 rows are newly changed and the 10/05/2021 were what it was previously, if this could be ordered as well to show the newest change and then underneath the previous data for each row that would be a bonus. (i have 1000's of rows and around 50 or so changes are made every week, the effective from date is always the Monday of each week)

 

Thanks Paul J

 

SiteJob TitleEffective FromEMP TypePre/Post/EmpRate TypePayChargePay OTCharge OT
Paul J Test sitePaul Test Card30/08/2021PAYEPre ParityOT 111.0013.0011.0013.00
Paul J Test sitePaul Test Card30/08/2021PAYEPre ParityOT 212.0014.0012.0014.00
Paul J Test sitePaul Test Card30/08/2021PAYEPre ParityWeekday10.0012.0010.5012.50
Paul J Test sitePaul Test Card10/05/2021PAYEPre ParityOT 110.0012.0010.6712.67
Paul J Test sitePaul Test Card10/05/2021PAYEPre ParityOT 29.5011.5010.4212.42
Paul J Test sitePaul Test Card10/05/2021PAYEPre ParityWeekday9.0011.0010.1712.17
Paul J Test sitePaul Test Card23/11/2020PAYEPre ParityOT 18.5010.509.9211.92
Paul J Test sitePaul Test Card23/11/2020PAYEPre ParityOT 28.0010.009.6711.67
Paul J Test sitePaul Test Card23/11/2020PAYEPre ParityWeekday7.509.509.42

11.42

3 REPLIES 3
edhans
Super User
Super User

Hi @pauljohnson - you didn't provide a visual of what your expected results are, nor a more complete set of data, so I faked some data in with yours, and then tried to read what you wanted, but as they say, a picture is worth a thousand words. 😁

edhans_0-1630961797071.png
The measure for Item Rank is:

Item Rank = 
RANKX(
    ALLEXCEPT(
        'Table',
        'Table'[Site],
        'Table'[Job Title]
    ),
    CALCULATE(
        SELECTEDVALUE( 'Table'[Effective From] )
    ),
    ,
    ,
    DENSE
)

Then I opened the Filter pane and told it to only show data where the Item Rank was <= 2 to show the top two items.

Finally, in this Table visual, selected the Site to sort by it, then I held the SHIFT key and subsequently selected the Rate Type, then finally the Effective From field (twice) to make that one descending.

If that isn't what you want please provide more info. Specifically more than just Paul's data so we can test it against multiple people, and mock up your desired results in Excel and screencap that here for us.

 



Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!

DAX is for Analysis. Power Query is for Data Modeling


Proud to be a Super User!

MCSA: BI Reporting

Hi @edhans many thanks for your speedy response, i understand the concept now and believe the solution would work was it not for a circular dependancy, i have no relationships to the table, and the columns used are not calculated columns, i have looked looked and looked and cannot figure out why even after reading an article on this, any advice would be helpful.

 

below is the code i am using 

Change Rank = 
RANKX(
    ALLEXCEPT(
        Changes,
        Changes[Site id],
        Changes[Template]
    ),
    CALCULATE(
        SELECTEDVALUE(Changes[Effective From - Copy])
    ),
    ,
    ,
    Dense
)

Not sure the issue exactly. The formula I gave you is a measure, not a calculated column.



Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!

DAX is for Analysis. Power Query is for Data Modeling


Proud to be a Super User!

MCSA: BI Reporting

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors