Forum Discussion

nroeder's avatar
nroeder
Frequent Visitor
1 year ago
Solved

Product Price Variance

I currently have a table with Item#, Invoice#, Price, and Qty.    I want to be able to find price variances of products over mulitple invoices.  Ex. Item# AB-101 cost $4 on Invoice#101  Item# A...
  • Shravan133's avatar
    1 year ago

    Create a measure for min price :

    Min Price =
    CALCULATE(
    MIN('YourTable'[Price]),
    ALLEXCEPT('YourTable', 'YourTable'[Item#])
    )

     

    2. same for max price:

    Max Price =
    CALCULATE(
    MAX('YourTable'[Price]),
    ALLEXCEPT('YourTable', 'YourTable'[Item#])
    )

     

    3. Variance:

    Price Variance = [Max Price] - [Min Price]

    This measure will reflect the difference between the highest and lowest prices across all invoices for each item.