Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago
Solved

M Code help

Hii,

 

I am new to Power BI, Zero knowlege about M Code in power query editor, my requirement is

 

I have two tables Table 1 contains two measures (Available Capacity) , (Allocated Capacity) with dimmensions year,month, Customer,Organization

Table 2 Contains two measures (BGSW),(OSHC) with Dimensions year, month, Customer , Organization , Prim Skillset ( Extra Dimension in Table 2

Requirement is i want two measure coloums BGSW and OSHC from Table 2 in to Table 1 . please help me in M code

(i.e) I can do this in DAX but i have to do in power Query editor beacuse after getting coloums in to table 1 i need to transpose the table

Please help me in M code or suggest me any M code learing article so i can solve this problem

 

 

  • Hi,

    you have to group bi your table2 before merging

    I hope i understood your need, on the contrary you have to publish sample data and the desired result (in the images of your data there are not any solution)

     

10 Replies

  • Hi,

    i think that what you are trying to do is not possible.

    You have first in power query to create your measures adding columns to your queries then you can try to merge the queries.

    Please post some sample data (not images).

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi, thanks for the reply

    Table 1

    YearMonthCustomerOrganizationAllocated CapacityAvailable Capacity
    202212PS-DPSX/EAB311
    2022122WP-PS-ECMS/EPE-PJ-PE-2WP11
    202212AS-ERMS/EVS-SDS-PJ-NXT11
    202212PS-BAMS/EHB3-PS11
    202212BEG-Non/MCRMS/EXP4-XC11
    202212PS-Y/NE-SCMS/ECJ2-PS11
    2022120A101SX/ETL411
    202212XC-CTMS/EXM4-XC11
    202212CMS/EPE-EV-2WP11
    202212XC-CTMS/PJ3-ECV-XC11
    202212CC-MBMS/ESD-FR1-XC11
    202212PS-ECMS/EDI3-XC11
    202212XC-DXMS/EEV4-PS11
    202212XC-CTMS/EDI-XC11
    202212CISX/PMO111

     

    Table 2

    YearMonthCustomerOrganizationPrimSkillSetBGSWOSHC
    202212XC-CTMS/EKI1-XCProgram management11
    202212XC-CTMS/ECS-XC-EP3Software Architecture11
    202212XC-CTMS/ECP1-XCProject Management11
    202212XC-CTMS/ECP1-XCSystem Test Execution11
    202212XC-CTMS/ECP4-XCProduct Security11
    202212XC-CTMS/EDI1-XCProgram management11
    202212XC-CTMS/EKI2-XCAUTOSAR Base Software development11
    202212XC-CTMS/ECT2-XCEmbedded Security development and Integration11
    202212XC-CTMS/ECO5-XCProject Management Support11
    202212XC-CTMS/ESN5-CCProject Management11
    202212XC-CTMS/ETW4-2WPEmbedded testing11
    202212XC-CTMS/ECP6-XCManagement and Support11
    202212XC-CTMS/ECF2-XCEmbedded Application Software Development11
    202212XC-CTMS/ECF1-XCDevOps1

    1

     

    So i want to merge tables such that in Table 1 i want BGSW and OSHC coloums to be added 

    Thanks 

  • Anonymous's avatar
    Anonymous
    Not applicable

    Thanks for the reply im new here how can i post sample data ?

      • Anonymous's avatar
        Anonymous
        Not applicable

        Hii i dont know i posted data 5 times after refreshing the page the post getting deleted

        See this is how i posted more than 5 times