Forum Discussion

yaman123's avatar
yaman123
Post Partisan
5 years ago

New Function Values

Hi, 

 

Is it possible to create two new functions (highlighted in yellow) - H total and L Total. 

 

H Total is a sum of H Staff and H Production

L Total is a sum of L Staff and L Production

 

Headcount is a measure i created and Function is a column

 

 

TIA 

4 Replies

  • yaman123 

    The two new measures that you need.

    H Total = 
    SUMX(
        VALUES(Table[Function]),
        INT(UPPER(LEFT(Table[Function],1)) = "H") * [Headcount]
    ) 
    
    
    L Total = 
    SUMX(
        VALUES(Table[Function]),
        INT(UPPER(LEFT(Table[Function],1)) = "L") * [Headcount]
    ) 
    
    • yaman123's avatar
      yaman123
      Post Partisan

      Fowmy 

       

      Can a new column be created which will show all functions instead of two new measures. I would like the output to be like the example i attached above? 

      • Fowmy's avatar
        Fowmy
        Super User

        yaman123 

        I suggest you keep them as measures rather than adding them to the table. Yes, you can but you need to add those two lines in your Function column and create a measure to check and conditionally populate the measure.

  • v-janeyg-msft's avatar
    v-janeyg-msft
    Community Support

    Hi, yaman123 

     

    Do you want to display the values of H Total and L Total separately in card visual? What's wrong with your result in screenshot? Can you show some sample fake data and your desired result like ? So we can help you soon.

     

    Best Regards

    Janey Guo

     

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.