Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
kunal_mehta1
Helper I
Helper I

Dax query

Hi all,
I have a sample data of current dataset and the to be data set.
I want the O NUMBER Project row'S columns to the C NUMBER ROW.
Please see the attached sample data.
DATA SET O PROJ.PNG 

5 REPLIES 5
tamerj1
Super User
Super User

Hi @kunal_mehta1 
Please refer to attached sample file with the proposed solution

1.png

 

Table 2 = 
GENERATE ( 
    FILTER ( 'Table', 'Table'[Project O] <> BLANK ( ) ),
    VAR CurrentProjectO = 'Table'[Project O]
    VAR CurrentName = 'Table'[Name]
    VAR T = 
        FILTER ( 
            'Table', 
            'Table'[Project] = CurrentProjectO
                && 'Table'[Name] = CurrentName
        )
    RETURN
        SELECTCOLUMNS ( 
            T,
            "O.Dollars", 'Table'[Dollars],
            "O.Dollars A", 'Table'[Dollars A],
            "O.Dollars B", 'Table'[Dollars B],
            "O.Dollars C", 'Table'[Dollars C]
        )
)
Wilson_
Solution Sage
Solution Sage

Hello Kunal,

 

Hard to know how to answer this without knowing what tools you have to work with. Are you trying to do this in Excel? Power BI? SQL? Without knowing anything else, all I can really tell you is that it looks like you would want to join your table to itself on the Project O field being equal to the Project field.


----------------------------------
If this post helps, please consider accepting it as the solution to help other members find it quickly. Also, don't forget to hit that thumbs up and subscribe! (Oh, uh, wrong platform?)

Hi Sorry @Wilson_ 
I am working on Power BI. Yes i am trying to 

join the table to itself on the Project O field being equal to the Project field.

Hello Kunal,

 

Maybe this other thread will help you?


----------------------------------
If this post helps, please consider accepting it as the solution to help other members find it quickly. Also, don't forget to hit that thumbs up and subscribe! (Oh, uh, wrong platform?)

Nope, it doesn;t help. The Project O column is a calculated column which is in Power BI Desktop and cant merge the query using that column in Power Query Editor.


Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors