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
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
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.

Top Solution Authors