Forum Discussion
Azure Cost Management- Split Tags into columns
I have data from azure cost management connector and I want to split the tags into columns.
The tags are no longer json wrapped, and even when I've tried to convert it to json I get errors. Also splitting by commas does not work as each tag is different.
I saw another post similar to this and the solution did not work. I keep getting a column of errors. Any thoughts or suggestions on ways I can make this happen?
Here is an example of what the tags look like, all of them contain different information. I want to pull out all "AppName" and put into a column:
"Environment": "DEV","BillTo": "NA","AppName": "NA","Role": "Unassigned"
Here's what I tried following a solution from a different post. I get a find error stating that "AppName" can't be found.
AppName =
VAR tag = "AppName"
VAR textLength =
FIND( ",",
'Usage details'[Tags],
FIND(tag,'Usage details'[Tags])+LEN(tag)+3)-(FIND(tag,'Usage details'[Tags])+LEN(tag)+3)-1
RETURN
MID(
'Usage details'[Tags],
FIND(tag,'Usage details'[Tags])+LEN(tag)+3,
textLength)
- Anonymous6 years ago
Hey Anonymous ,
I shared a solution that worked for me over here:
Hope that helps you!
4 Replies
- parry2kSuper User
Anonymous share the sample data with expected output, it will help to provide the solution.
- AnonymousNot applicableDAX is a DATA ANALYSIS eXPRESSIONS language, not a data mashup language. Please use the right tool for the job: Power Query.
Best
D - AnonymousNot applicable
HI Anonymous,
Since we not so clear for your data structure, can you please provide some dummy data to test? It is hard to coding formula from your description without any other sample data.
How to Get Your Question Answered Quickly
Notice: if you not so familiar with power query language, it will hard fix and modify on power query formulas if data structure changes in your data source. (power query will cache previous data structure in query step, they not auto-sync if source data structure changes; it mean you need to manly fix these not match fields in all of the steps)
Regards,Xiaoxin Sheng
- AnonymousNot applicable
Hey Anonymous ,
I shared a solution that worked for me over here:
Hope that helps you!