Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredJoin us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.
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 ) )
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 8 | |
| 6 | |
| 3 | |
| 3 | |
| 3 |
| User | Count |
|---|---|
| 13 | |
| 9 | |
| 8 | |
| 8 | |
| 7 |