Forum Discussion

tig2810's avatar
tig2810
New Member
9 years ago
Solved

Consolidate / Aggregate data for then creating visuals

 

 Hi there,

 

I am very new to PowerBI/DAX and was looking for some assistance.

 

I have an Orderitem table of say 1000 orderitems of which there are 300 orders (average 3.3 lines per order). I need to do analysis on orders not orderitems, therefore i need to be able to aggregate or consolidate the rows.

 

I have illustrated the before and required after below.  

 

Many thanks 

 

OrderNumberOrderItemWeightVolumeQuantityItem PriceLinePriceDescription 
121111200.23101.9919.9Some parts
121121000.25111.9921.89Some parts
121131300.23152.9944.85Some parts
121141400.21183.9971.82Some parts
121151500.63204.9999.8Some parts
        
Becomes the below:      
        
OrderNumberOrderItemWeightVolumeQuantityItem PriceLinePriceDescription 
121156401.557415.95258.26Some parts
        
Max ofCount OfSum OfSum OfSum OfSum OfSum OfMax of
  • Hi tig2801,

     

    If the dataset table is the same as what the picture shows, you only need to add columns to a table visual directly. Please pay attention to that don’t select the Description column, instead, you should create a new measure following the DAX forluma below:

     

    Description = LASTNONBLANK(Sheet1[Description ] ,1).


    If you have any question, please feel free to ask.


    Best regards,
    Yuliana Gu

1 Reply

  • v-yulgu-msft's avatar
    v-yulgu-msft
    Microsoft Employee

    Hi tig2801,

     

    If the dataset table is the same as what the picture shows, you only need to add columns to a table visual directly. Please pay attention to that don’t select the Description column, instead, you should create a new measure following the DAX forluma below:

     

    Description = LASTNONBLANK(Sheet1[Description ] ,1).


    If you have any question, please feel free to ask.


    Best regards,
    Yuliana Gu