Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago
Solved

Counting a measure return

Hello,   I'm linking to a previous post of mine to help give more context if needed.   https://community.powerbi.com/t5/Desktop/Measures-affected-by-slicer-choice/m-p/595019#M282535   I have a ...
  • v-jiascu-msft's avatar
    7 years ago

    Hi Anonymous,

     

    Please try a solution like below. 

    1. Create a new table [Sellers].

    Sellers = VALUES('Table'[SELLER])

    2. Create a measure.

    Measure =
    SUMX (
        ADDCOLUMNS (
            SUMMARIZE ( 'Table', 'Table'[ITEM ID], 'Table'[SELLER], 'Table'[PRICE] ),
            "ifMinPrice", IF (
                [PRICE]
                    = CALCULATE (
                        MIN ( 'Table'[PRICE] ),
                        ALL ( 'Table'[SELLER], 'Table'[PRICE] ),
                        ALLSELECTED ( 'Sellers'[SELLER] )
                    ),
                1,
                0
            )
        ),
        [ifMinPrice]
    )
    

    Counting-a-measure-return

     

    Best Regards,