Forum Discussion

PBI_newuser's avatar
PBI_newuser
Post Prodigy
4 years ago
Solved

Remove rows based on condition

Hi, I need to calculate the average unit selling price (AUSP) based on the condition below. Sample pbix here. If the total revenue of last year = 0 or total revenue of current year = 0, keep the ro...
  • Anonymous's avatar
    Anonymous
    4 years ago

    Hi PBI_newuser , 

    Please modify this formula :Current Year.

     

    Current year =
    VAR result1_ =
        SUMX (
            FILTER (
                ALLSELECTED ( 'Append Table' ),
                'Append Table'[next_count] = BLANK ()
                    && 'Append Table'[last_count] = BLANK ()
                    && [min_] = 3
                    && 'Append Table'[Fis] = SELECTEDVALUE ( 'Calendar'[Fiscal Year] )
            ),
            [Revenue Current Year]
        )
    RETURN
        result1_
    

     

     

    Best Regards

    Community Support Team _ Polly

     

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