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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

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
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.