Forum Discussion
Alternative Dax for Calculated Column?
- 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.
Hi, beside adding a computed column in your SQL view or table, you may also try switching to a 'Composite model'.
When you set the table to Dual or Import, you can create calculated columns because the data is cached locally. This allows your SWITCH + concatenation logic to work exactly as in Import mode.