Forum Discussion

Michael_nik's avatar
Michael_nik
Regular Visitor
3 years ago
Solved

Making a pivot table

Hi everyone!   I'm new in power bi, but I have a strong basis in Pyton. I was given a simple task to make a table from sample one which is given in Power BI by default. So the task is to calculate ...
  • PaulDBrown's avatar
    PaulDBrown
    3 years ago

    Use this measure:

    Gross Sales by min Sale Price =
    VAR _minPrice =
        MIN ( financials[Sale Price] )
    VAR _MinPriceAll =
        CALCULATE ( MIN ( financials[Sale Price] ), ALL ( 'Product Table' ) )
    RETURN
        CALCULATE (
            SUM ( financials[Gross Sales] ),
            FILTER ( 'Product Table', _minPrice = _MinPriceAll )
        )