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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
Soizle
New Member

Combine 2 rows data to make 1 row in 2 columns without pivot

Hi,

Here is my data :

NamePhaseStatuts

Extract 2D plans

APSHigh
Extract 2D plansEXEMedium
Extract 2D plansLIVLow

Other Function

APSMedium
Other FunctionEXELow
Other FunctionLIVHigh

 

And I want to have this :

NameAPSEXELIV
Extract 2D plansHighMediumLow
Other FunctionMediumLowHigh

 

I want to do this on PowerBI, without using Power Query (because I have a lot of operations done in Power BI before)

 

This is for making a Sankey diagram : Source APS and Destination EXE then Source EXE and Destination LIV

 

If there is any others solutions (differents data agency or methods), I'm in !

 

Thanks

 

1 ACCEPTED SOLUTION

Hi @Soizle,

 

You can try measure as:

 

Measure = 
CALCULATE(
    MAX('Table'[Statuts]),
    FILTER(
        'Table',
        'Table'[Phase]=MAX('Table'[Phase])
    )
)

 

And drop fields to matrix.

vxulinmstf_0-1626744052970.png

The pbix is attached.

 

If you still have some question, please don't hesitate to let me known.‌‌

 

Best Regards,

Link

 

Is that the answer you're looking for? If this post helps, then please consider Accept it as the solution. Really appreciate!

View solution in original post

6 REPLIES 6
v-xulin-mstf
Community Support
Community Support

Hi @Soizle

 

You can create measures as:

APS = 
CALCULATE(
    MAX('Table'[Statuts]),
    FILTER(
        'Table',
        'Table'[Phase]="APS"
)
)
EXE = 
CALCULATE(
    MAX('Table'[Statuts]),
    FILTER(
        'Table',
        'Table'[Phase]="EXE"
)
)
LIV = 
CALCULATE(
    MAX('Table'[Statuts]),
    FILTER(
        'Table',
        'Table'[Phase]="LIV"
)
)

Here is the output:

vxulinmstf_0-1626677238094.png

The pbix is attached.

If you still have some question, please don't hesitate to let me known.‌‌

 

Best Regards,

Link

 

Is that the answer you're looking for? If this post helps, then please consider Accept it as the solution. Really appreciate!

Hi and thanks.

In fact I'm looking for doing this in only one automated request beacause I have several types. Is that possible ?

Hi @Soizle,

 

You can try measure as:

 

Measure = 
CALCULATE(
    MAX('Table'[Statuts]),
    FILTER(
        'Table',
        'Table'[Phase]=MAX('Table'[Phase])
    )
)

 

And drop fields to matrix.

vxulinmstf_0-1626744052970.png

The pbix is attached.

 

If you still have some question, please don't hesitate to let me known.‌‌

 

Best Regards,

Link

 

Is that the answer you're looking for? If this post helps, then please consider Accept it as the solution. Really appreciate!

Hi @v-xulin-mstf 

Is it possible to convert this mesure into a table?

I tried with CALCULATETABLE but the parameters are not correct

Thanks

Hi @diegomartinop

 

Table does not support your expectations under the conditions of using a query.

I'm not clear your issue, could you provide more details?

 

Best Regards,

Link

 

Is that the answer you're looking for? If this post helps, then please consider Accept it as the solution. Really appreciate!

@v-xulin-mstf actually I would like to do the same thing that was presented by @Soizle but I need to see the data as a table because the diagram I want to use does not accept mesure in the axis

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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