Supplies are limited. Contact info@espc.tech right away to save your spot before the conference sells out.
Get your discountScore big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount
Single Tran1 =
Var table1=
SUMMARIZE(
FILTER(V_STORE_TRAN_FACT,'V_STORE_TRAN_FACT'[Year]=[FY] && 'V_STORE_TRAN_FACT'[Week2]=[WK] ),
V_STORE_TRAN_FACT[STORE_KEY],
V_STORE_TRAN_FACT[TRANSACTIONID],
"T1",Sum('V_STORE_TRAN_FACT'[TRANS_QTY]))
Return
COUNTX(FILTER(table1,[T1]=1),[TRANSACTIONID])
Hi @Anonymous
Actually, the inner FILTER is the oart of the code that consumes most of the time. It includes the evaluation of two measures at each iteration. I see that this filter is absolutely not required. The table is already filtered by the year and week available in the current filter context.
I guess by removing it, the results shall remain unchanged.
Single Tran1 =
VAR table1 =
SUMMARIZE (
V_STORE_TRAN_FACT,
V_STORE_TRAN_FACT[STORE_KEY],
V_STORE_TRAN_FACT[TRANSACTIONID],
"T1", SUM ( 'V_STORE_TRAN_FACT'[TRANS_QTY] )
)
RETURN
COUNTROWS ( FILTER ( table1, [T1] = 1 ) )
User | Count |
---|---|
13 | |
8 | |
8 | |
7 | |
5 |
User | Count |
---|---|
21 | |
15 | |
15 | |
10 | |
7 |