Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

DAX conditional formatting issue


I purchase order can have multiple receiving, I have a measure that highlights purchase quantity if purchase quantity is not equivalent to receive quantity , but the formula higligihts this purchase number although the total matches the purchase quantity

 

Mismatch Highlight VADT itrem = VAR PurchaseQuantity = [Purchase Quantity(PO)] VAR GRNQuantity = [Received Quantity(GRN)] VAR Difference = ABS(PurchaseQuantity - GRNQuantity) RETURN IF (Difference > 0, "#EEB3C0", BLANK())

Please help on how can I rectify this issue 

Untitled picture.png

Status: Investigating
Comments
Anonymous
Not applicable

Hi @Anonymous ,

 

I made samples following the data you provided and realized your idea by creating two measures:

vtianyichmsft_0-1698997178628.png

Group = CALCULATE(SUM('Table'[Received Quantity(GRN)]),ALLEXCEPT('Table','Table'[Vendor Name]),'Table'[Purchase Number])

Highlight = IF(SUM('Table'[Purchase Quantity(P0)]) = [Group],"White","Red")

 

Hope it helps!

 

Best regards,
Community Support Team_ Scott Chang