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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
Juju123
Helper III
Helper III

DirectQuery Mode : Get previous value in new column

Hello, 

 

I'm work on Power BI DirectQuery mode. I need to create a new column which get previous value group by severals column. 

I can't create index in DirectQuery Mode. 

I created this measurement but it does not retrieve all of the previous date.

 

Previous_Date = MAXX(FILTER(ALL('CAGC_ADVL_INDICATEURS_ETAPES_WF_REP'),CAGC_ADVL_INDICATEURS_ETAPES_WF_REP[Numero de l'operation]<SELECTEDVALUE('CAGC_ADVL_INDICATEURS_ETAPES_WF_REP'[Numero de l'operation])&&[Designation article]=SELECTEDVALUE('CAGC_ADVL_INDICATEURS_ETAPES_WF_REP'[Designation article])),CAGC_ADVL_INDICATEURS_ETAPES_WF_REP[WF - Date fin reelle])

 

 

The goal is to retrieve the previous date for each Workflow, Article, Article designation, Operation code. 

 

Thanks for your help 🙂

 

An example of my data:

WF - Numéro du workflowArticleDesignation articleCode opérationNumero de l'operationLibellé opérationDate réelle de finPrevious_Date
WF000000000246044230AA:F0052COFFRET DESENSIBILISATIONOPE02020 05/11/2018 00:00 
WF000000000246044230AA:F0052COFFRET DESENSIBILISATIONOPE03030 24/10/2018 00:0005/11/2018 00:00
WF000000000246044230AA:F0052COFFRET DESENSIBILISATIONOPE07070 19/12/2018 00:0005/11/2018 00:00
WF000000000246044230AA:F0052COFFRET DESENSIBILISATIONOPE09090 15/11/2018 00:0019/12/2018 00:00
WF000000000246044230AA:F0052COFFRET DESENSIBILISATIONOPE09999 14/09/2023 00:0019/12/2018 00:00
WF000000000246044230AA:F0052COFFRET DESENSIBILISATIONOPE110110 07/11/2018 00:0014/09/2023 00:00
WF000000000246044230AA:F0052COFFRET DESENSIBILISATIONOPE140140 07/11/2018 00:0014/09/2023 00:00
WF000000000246044230AA:F0052COFFRET DESENSIBILISATIONOPE150150 07/11/2018 00:0014/09/2023 00:00
WF000000000246044230AA:F0052COFFRET DESENSIBILISATIONOPE160160 23/11/2018 00:0014/09/2023 00:00
WF000000000246044230AA:F0052COFFRET DESENSIBILISATIONOPE170170 07/11/2018 00:0014/09/2023 00:00
WF000000000261903443AA:F0052ON-BOARD BACKSHELL AND PLUGSOPE02020 05/11/2018 00:0007/11/2018 00:00
WF000000000261903443AA:F0052ON-BOARD BACKSHELL AND PLUGSOPE03030 24/10/2018 00:0007/11/2018 00:00
WF000000000261903443AA:F0052ON-BOARD BACKSHELL AND PLUGSOPE07070 19/12/2018 00:0007/11/2018 00:00
WF000000000261903443AA:F0052ON-BOARD BACKSHELL AND PLUGSOPE09090 15/11/2018 00:0019/12/2018 00:00
WF000000000261903443AA:F0052ON-BOARD BACKSHELL AND PLUGSOPE09999 14/09/2023 00:0019/12/2018 00:00
1 REPLY 1
lbendlin
Super User
Super User

 I need to create a new column which get previous value group by severals column. 

Not sure what "previous value"  means but in Direct Query (or rather Mixed Mode)  you can only create calculated columns from data in the same row.

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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