Forum Discussion

Quest's avatar
Quest
Advocate I
4 years ago
Solved

Problem with calculating values

There is a calculation I am trying to achieve: The data in my report is something like below: Date Product Type #Subscribed 7/1/2021 A Web 2 7/1/2021 A Desktop 5 7/1/2021 B W...
  • smpa01's avatar
    4 years ago

    Quest  please try this

     

    Measure =
    CALCULATE (
        CALCULATE (
            DISTINCTCOUNT ( 'Table'[Product] ),
            CALCULATETABLE (
                'Table',
                FILTER (
                    ADDCOLUMNS (
                        'Table',
                        "@count",
                            CALCULATE (
                                SUM ( 'Table'[#Subscribed] ),
                                ALLEXCEPT ( 'Table', 'Table'[Date], 'Table'[Product] )
                            )
                    ),
                    [@count] >= 10
                )
            )
        ),
        ALLEXCEPT ( 'Table', 'Table'[Date] )
    )