Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

Dividing on condition (DAX)

Hey guys,   At first I want to let you know that I'm new to PowerBi.   I want to create a % value based on the data (with dax coding) The picture you see here is an example of the value that I c...
  • v-jingzhang's avatar
    v-jingzhang
    5 years ago

    Hi Anonymous 

     

    Please try this measure:

    Percentage = DIVIDE(SUM('Ordertime lookup'[tijd min]),SUM('geschatte tijd'[geschatte tijd in min]))

    You need to use SUM function to calculate the sum total of the values before you use them in the DIVIDE function. 

     

    Then you can change the measure's format to Percentage by Measure tools -> Formatting.

    Best Regards,

    Community Support Team _ Jing Zhang

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

  • Anonymous's avatar
    Anonymous
    5 years ago

    Dear v-jingzhang 

     

    in each case I didn't have any problem with it when I added it to my dashboard.

     

    Now that you have the sample data maybe you can also help me with a question I'm currently dealing with.

    I'm trying to show the average % value of the previous calculation.

    But to my understanding you can't look at a measurement, because it's not specified as a column. 

    So i thought maybe I can show the average value with the following code

     

    I thought maybe by dividing the unique row count of the table I would get the average value.

    But my Excel sheets shows another value:

     

    Do you know a solution for this (or how I need to modify the dax code)?

     

    Greetings,

     

    SRMulti