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

Get inspired! Check out the entries from the Power BI DataViz World Championships preliminary rounds and give kudos to your favorites. View the vizzies.

Reply
pdeubner
Regular Visitor

Create set/ order value from single row in set

Dear,

 

I currently have an issue where I seemingly meet my limits - even though I thought it should be quite easy to do.

In a table, I have a lot of data out of our ERP system

They have the following structure (as an excerpt)

 

order no.phaseressourcehead ressourceroughly 200 additional columns
1234561010material  
1234561010material  
1234562010UMP_01  
1234562010UMP_01  
1234562010UMP_01  
1234564010personnel  
1234564010personnel  
1234571010material  
1234571010material  
1234572010UMP_02  
1234572010UMP_02  
1234574010personnel  
1234574010personnel  

 

We have several orders that have reports using different ressouces. The number of reports against the order are varying. 

In order to summarize based on the ressource (=production machine), I would like to have the ressource of phase 2010 in the column head ressource for all rows of the corresponding order.

 

What I did so far was to create a key column, consisting of order and phase and trying to do a LOOKUPVALUE. However, since there are multiple entries, I never got it working.

 

So - any help would be highly appreciated.

Thank you!

Regards

 

Philip

1 ACCEPTED SOLUTION

Is this what you're looking for?

resource2 = 
CALCULATE (
    MAX ( Data[ressource] ),
    FILTER ( ALLEXCEPT ( Data, Data[order no.] ), Data[phase] = 2010 )
)

danextian_0-1738943894128.png

 





Dane Belarmino | Microsoft MVP | Proud to be a Super User!

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


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.

View solution in original post

4 REPLIES 4
pdeubner
Regular Visitor

Hi @danextian ,

thank you for your swift feedback and your remarks.

Based on my sample data, I would expect in all rows for 

 

order 123456 stating UMP_01 in the column head ressource and for

order 123457 stating UMP_02 in the column head ressource

 

And thank you as well for your remarks on the performance. I will have a look into the needed columns as soon as the report is finished.

Is this what you're looking for?

resource2 = 
CALCULATE (
    MAX ( Data[ressource] ),
    FILTER ( ALLEXCEPT ( Data, Data[order no.] ), Data[phase] = 2010 )
)

danextian_0-1738943894128.png

 





Dane Belarmino | Microsoft MVP | Proud to be a Super User!

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


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.

Excactly like this - thanky you for your effort!

danextian
Super User
Super User

Hi @pdeubner 

I don't quite get this statement

 I would like to have the ressource of phase 2010 in the column head ressource for all rows of the corresponding order.

Using your sample data, what result do you expect?

 

Also, do you really need  those 200 columns or you only think you need them? While Power BI can handle that much columns, it can degrade the performance of your model.





Dane Belarmino | Microsoft MVP | Proud to be a Super User!

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


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

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

Feb2025 NL Carousel

Fabric Community Update - February 2025

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

Top Kudoed Authors