Forum Discussion

marge_po's avatar
marge_po
New Member
3 years ago
Solved

DAX formula

Hello everyone,

I have a table like this, how can I write the DAX to get total downtime_percent by branch

The formula is: (100 - downtime_percent)/ number of ID

 

Thx.

 

  • Hi marge_po 

    >>write the DAX to get total downtime_percent by branch

    create the measure,

     

    TotalByBranch = CALCULATE(SUM('Table'[downtime_percent]),FILTER(ALL('Table'),'Table'[branch]=MIN('Table'[branch])))

     

     

    Best Regards,

    Community Support Team _Tang

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

3 Replies

  • menglaro78's avatar
    menglaro78
    Microsoft Employee

    Hi,
    it's not clear what you want to get, can you give examples with result numbers?

  • marge_po , If case you need a measure

     

    Averagex(Table, 100 - [downtime_percent])

     

    Plot in visual with branch.

     

    If this does not help. As already asked by menglaro78 .
    Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.

  • v-xiaotang's avatar
    v-xiaotang
    Community Support

    Hi marge_po 

    >>write the DAX to get total downtime_percent by branch

    create the measure,

     

    TotalByBranch = CALCULATE(SUM('Table'[downtime_percent]),FILTER(ALL('Table'),'Table'[branch]=MIN('Table'[branch])))

     

     

    Best Regards,

    Community Support Team _Tang

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