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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

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_
Super User
Super User

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?)




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





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?)




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





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
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

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