The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
Hi,
I would like to get only week number e.g. '11' from Source name.
Please help for M code.
Solved! Go to Solution.
Hi @jeongkim - you can achieve this in two ways in M code add a new custom column as bleow
Text.Middle([Source Name],1,2)
Method2: Text.BetweenDelimiters([Source Name], "W", "_")
column from example with selection of source name column , you can give suggestion of 1 example to the query engine , you can achieve the output as expected.
Hope it works
Proud to be a Super User! | |
Hi @jeongkim - you can achieve this in two ways in M code add a new custom column as bleow
Text.Middle([Source Name],1,2)
Method2: Text.BetweenDelimiters([Source Name], "W", "_")
column from example with selection of source name column , you can give suggestion of 1 example to the query engine , you can achieve the output as expected.
Hope it works
Proud to be a Super User! | |
Thanks it works, accepted.
Another question pls, can we add Minus function with today's week number?
e.g. 30(from W30 xxxxxx(source.name)) - 35(from today's week) which result will be -5
I wanna get data only in the last 26 weeks(half year) but the numbers from custom column you helped doens't have filter for this function, it seems only date filter is available.
So I wanna make calculation to filter if it is below than -26 than unfilter.