Forum Discussion

lauriedata's avatar
lauriedata
Resolver I
10 months ago
Solved

Alternative Dax for Calculated Column?

This calc column works in import mode by not DQ.  Tried to convert to a measure but can't due to mutltiple options within the categories.  Can someone help me find another way to convert this formula...
  • Kedar_Pande's avatar
    10 months ago

      

    Try creating a calculated table for your dimension:

    Period Alias Dim =
    SUMMARIZE(
    v_flt_enrollment,
    v_flt_enrollment[ag_level],
    v_flt_enrollment[fiscal_nbr_in_year],
    "Period Alias",
    SWITCH(
    v_flt_enrollment[ag_level],
    "DAILY", "DAY " & v_flt_enrollment[fiscal_nbr_in_year],
    "WEEKLY", "WK " & v_flt_enrollment[fiscal_nbr_in_year],
    "MONTHLY", "MNTH " & v_flt_enrollment[fiscal_nbr_in_year],
    "QTR", "QTR " & v_flt_enrollment[fiscal_nbr_in_year],
    "YEARLY", "FY",
    "CHECK"
    )
    )

    Then use this table in your visual instead.

    lauriedata