Forum Discussion

gauravnarchal's avatar
gauravnarchal
Post Prodigy
6 years ago
Solved

DAX ALL Formula

How can I add "ALL formula" in the below measure so that it ignores all filters in the visual?

 

First Sales Date in Selected =
MAXX(
TOPN( 1,
SUMMARIZE(ARInvoices,ARInvoices[InvoiceDate],ARInvoices[ProfileNumber]),
CALCULATE( MIN(ARInvoices[InvoiceDate])), ASC ),
ARInvoices[InvoiceDate])
  • Hi gauravnarchal 

    Create measures

    Measure =
    MINX (
        TOPN (
            1,
            FILTER (
                ALL ( 'Table 2' ),
                'Table 2'[customer no] = MAX ( 'Table 2'[customer no] )
            ),
            CALCULATE ( MIN ( [invoice date] ) ), ASC
        ),
        [invoice date]
    )
    

    Best Regards
    Maggie
    Community Support Team _ Maggie Li
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

6 Replies

  • Greg_Deckler's avatar
    Greg_Deckler
    Community Champion

    gauravnarchal - Perhaps:

     

     

    First Sales Date in Selected =
    MAXX(
    TOPN( 1,
    SUMMARIZE(ALL(ARInvoices),ARInvoices[InvoiceDate],ARInvoices[ProfileNumber]),
    CALCULATE( MIN(ARInvoices[InvoiceDate])), ASC ),
    ARInvoices[InvoiceDate])

     

    • gauravnarchal's avatar
      gauravnarchal
      Post Prodigy

      Greg_Deckler  - Thank you for your response.

       

      I tried using this measure and now it had ignored the first invoice date of the customer.

       

      I am creating a measure to get the first invoice date of the customer. The measure should also ignore the filter/visual.

       

      Below is the table.

       

  • v-juanli-msft's avatar
    v-juanli-msft
    Community Support

    Hi gauravnarchal 

    Create measures

    Measure =
    MINX (
        TOPN (
            1,
            FILTER (
                ALL ( 'Table 2' ),
                'Table 2'[customer no] = MAX ( 'Table 2'[customer no] )
            ),
            CALCULATE ( MIN ( [invoice date] ) ), ASC
        ),
        [invoice date]
    )
    

    Best Regards
    Maggie
    Community Support Team _ Maggie Li
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.