Hi,
I have a report which was created in Import Mode and working pretty well but the data source has now been moved over to a Tabular Model and we can’t re-create some of the logic I created in Power Query/M.
My query did the following, it created a new row to for each Goods type that was carried in a container. So each Goods type is separated by a comma.
I haven’t started any work/learning on Tabular Models yet so it was my boss who tried to recreate the logic.
Should this be re-creatable in a Tabular Model? Are there any other ways of achieving this?
Or, can I create a DAX measure which will count how many of each Goods type is in the combined row?
Very basic dummy PBIX included.
Counting Strings.pbix (18.4 KB)
In case this helps, below is the snippet of M Code I used for creating a new row per goods class
DynamicColumnList = List.Transform(
{
1 .. List.Max(
Table.AddColumn(
#"Filtered Rows",
"Custom",
each List.Count(Text.PositionOfAny([Class Code], {","}, Occurrence.All))
)[Custom]
)
+ 1
},
each "Class Code." & Text.From(_)
),
#"Split Column by Delimiter" = Table.SplitColumn(
#"Filtered Rows",
"Class Code",
Splitter.SplitTextByDelimiter(",", QuoteStyle.Csv),
DynamicColumnList
@DavieJoe Your PQ code should absolutely work in SSAS, I don’t see the reason why it isn’t working. who is managing SSAS Tabular? You can create both Power Query and Legacy data source.
When you say data source has been moved to Tabular do you mean SSAS is the new data source(to fetch data and transform data in PBI) or data source/PQ transformation are created inside SSAS?
1 Like
Thanks @AntrikshSharma shared your reply with my boss and we are indeed carrying out the PQ transformation inside SSAS.
As a result, we will now be relooking at it, we perhaps gave up on it a bit too soon.
Will mark this as closed and, as always, appreciate your help!
DJ
1 Like