Forum Discussion

Raffael's avatar
Raffael
Frequent Visitor
8 years ago
Solved

Calculate Columns based on value comparison between two columns

Hello Power BI community,   i am struggling to accompish the following task: I want to sum revenue data based on the company family using DAX (would know how to do it in excel vba, but that feels t...
  • Anonymous's avatar
    Anonymous
    8 years ago

    Hi Raffael 

     

    If you want to create a summary table for the family from the source table, you can try the below DAX. Do it in Modelling -> nw Table and use this DAX.

     

    Sample2_Summary = SUMMARIZE(Sample2,Sample2[Company Family],"Total_Revenue",SUM(Sample2[Revenue]))

     

    But, you dont need to create this table unless you need it specifically as you can get the revenue per family in easy way.

     

    Create a measure Total_Revenue = SUM( Table1[Revenue]) and pull company family and this measure.

     

    Let me know if you need any further details.

     

    Thanks

    Raj

     

    Thanks

    Raj