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
Anonymous
Not applicable

Conditional Dynamic Custom Column

Hai All, I need help with this requirement on this which we want to do in the power query editor.
Background 
I work on the sales dashboard, so every month users will send a new version table with the same schema, so I use the appending option for every month to append every table.
So based on this column we can assure the different versions which appending every month(Attaching below)

alanpjames_0-1654242923229.png

And now i want create  one custom conditional  numerical column based on this 
Requriement
For 2021 verions will go like this format
V5-May-2021
V6-June-2021
V7-July-2021
V8-August-2021
V9-September-2021
V10-October-2021
V11-Novemebr-2021
V12-December-2021
based on 2021 data is ok but what about 2022 or Coming years it will be colapse
1st  requirment
So i want to create one custom numerical column that should only present numerical values
for eg. v5-may-2021 For the custom  custom should only return 5
2nd requirment 
From the next year 2022
The custom column values should show like this 122 , 222 , 322 , 422 etc(1 Is the version, 22 is the year)
From the next year 2023
The custom column values should show like this 123 , 223 , 323 , 423 etc(1 Is the version, 23 is the year)
So deired Custom column output 

Custom column 
8
9
10
11
12
122
222
322
 422




The top table from  8 to till 12 showing 2021 versions data and down it is showing next year(2022) desired values 
and this should be dynamically create for every version.
Note :  this i want to do in power query as a custom column 

please help me to acheieve this logic 

1 REPLY 1
lbendlin
Super User
Super User

You should always follow ISO-8601 guidelines when naming files  or date key columns.

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.