Forum Discussion

robbiecutting's avatar
robbiecutting
Frequent Visitor
9 years ago
Solved

Create a filtered and grouped calculated table

Hi, I'm relatively new to power bi so please bear with me!   If I have a table which lists the invoices for all customers, across all stores, can I create a calculated table which filters out a cer...
  • v-ljerr-msft's avatar
    v-ljerr-msft
    9 years ago

    Hi robbiecutting,

     

    Not like measures, calculate tables/columns are evaluated during the database processing(like a data refresh) and then stored in the model, and are not affected by user selection on the report. 

     

    In this scenario, I would suggest you to create a measure to calculate the "Total Sales" with corresponding conditions, then show the measure on a Table visual with other columns. The formula below is for your reference.:smileyhappy:

    Total Sales =
    CALCULATE (
        SUM ( Invoices[Invoice_Amount] ),
        FILTER (
            Invoices,
            Invoices[FinMonthNum]
                = MAX ( CurrentDate[CurrentMonth] ) - 1
        )
    )

     

    Regards