Forum Discussion
need help - Power query or M code solution needed
- 1 year ago
Hi ashwinkolte,
I hope this information is helpful. Please let me know if you have any further questions or if you'd like to discuss this further. If this answers your question, please Accept it as a solution and give it a 'Kudos' so others can find it easily.
Thank you.
HI jgeddes
First of all thank you so much for super fast response. Really appreciate that . I saw the PBIX file and the code . However I see that Column names are hardcoded . As I mentioned earlier the future blocks can have more columns (upto 25) and hence more common columns . Can the code be changed to perform all the column operations dynamically
Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).
Do not include sensitive information. Do not include anything that is unrelated to the issue or question.
Please show the expected outcome based on the sample data you provided.
Need help uploading data? https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-p/963216
Want faster answers? https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523
- ashwinkolte1 year ago
Helper III
Hi lbendlin
Thankyou so much for responding . Really appresiate that
The sample data and expected output is provided below . I dont see an option to attach files hence pasting the inpout file data. Hopefully you should be able to use this by just copying to an excel file . Have provided a image of expected output since I guess it is only for reference. Please note this is only sample data . In the real file there are more than 100000 rows and over 25 columns in total , spread across blocks of data with different number and sequence of columns as depicted in sample. Hence we cannot use hardcoded column names in the solution
Sample data
Monitor Usergroup Monitor_ group Contact Monitor1 Usergroup1 Monitor_group1 contact1 Monitor2 Usergroup2 Monitor_group2 contact2 Monitor Poller Contact Monitor_ group Usergroup Monitor3 Poller3 Contact3 Monitor_group3 Usergroup3 Monitor4 Poller4 Contact4 Monitor_group4 Usergroup4 Monitor Contact Usergroup Poller Monitor_ group Portnumber Monitor5 Contact5 Usergroup5 Poller4 Monitor_group5 Port5 Monitor6 Contact6 Usergroup6 Poller5 Monitor_group6 Port6
Expected output