none
number calculation based on column in DAX. RRS feed

Answers

  • something like this assuming you wont have ties in any values
    CALCULATE(COUNTROWS(column)+1,FILTER(Table,EARLIER(Column) < Column))


    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

    • Marked as answer by BI_Support Thursday, June 12, 2014 10:14 AM
    Thursday, June 12, 2014 8:24 AM

All replies

  • something like this assuming you wont have ties in any values
    CALCULATE(COUNTROWS(column)+1,FILTER(Table,EARLIER(Column) < Column))


    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

    • Marked as answer by BI_Support Thursday, June 12, 2014 10:14 AM
    Thursday, June 12, 2014 8:24 AM
  • I used ;

    Evaluate
    (
    CALCULATE
    (
     COUNTROWS(DimCustomer[customerKey])+1,
        FILTER
        (
        DimCustomer,EARLIER(DimCustomer[customerKey]) < DimCustomer[customerKey]
        )
    )
    )

    but it gives me below error;

    Executing the query ...
    Query (8, 14) EARLIER/EARLIEST refers to an earlier row context which doesn't exist.
    Execution complete.

    Please help

    Thursday, June 12, 2014 9:34 AM
  • Many thanks

    I have done this using

    Evaluate
    (
    addcolumns(
    DimCustomer,
    "ss",
    CALCULATE
    (
        COUNTROWS(DimCustomer)+1,
        FILTER
        (
          DimCustomer,EARLIER(DimCustomer[customerKey]) < DimCustomer[customerKey]
        )
    )
    )
    )
    order by DimCustomer[customerKey]

    • Marked as answer by BI_Support Monday, June 16, 2014 5:53 AM
    • Unmarked as answer by BI_Support Tuesday, June 24, 2014 7:01 AM
    Thursday, June 12, 2014 10:14 AM