Forum Discussion

Oros's avatar
Oros
Post Prodigy
3 years ago
Solved

Divide with filter

Hello,

 

I have this table below.  How do I divide the $ values between YES and NO  (NO divided by YES, meaning $30/$10)?  What would be the correct measure? Thanks.

 

 

2 Replies

  • DOLEARY85's avatar
    DOLEARY85
    Resident Rockstar

    Hi, 

     

    If each customer is going to have both a yes and no row you could use:

     

    Measure 4 = divide(CALCULATE(SUM('Table (2)'[sales]),'Table (2)'[Discounted]="NO"),CALCULATE(SUM('Table (2)'[sales]),'Table (2)'[Discounted]="YES"))
     
    If I answered your question, please mark my post as solution, Appreciate your Kudos 👍