Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi
I am experimenting with the following but finding that the filter criteria is not working as i expected but not sure why from what i have read.
2019-20 ACTUAL Income EXCL 100 = CALCULATE(
[2019-20 Totals],
Solved! Go to Solution.
A better formulation of your measure is this:
2019-20 ACTUAL Income EXCL 100 =
CALCULATE (
[2019-20 Totals],
KEEPFILTERS(
BIGL_BSCC_DATA_181920[ACCT_CATEGORY] <> "100"
),
KEEPFILTERS(
'BIGL_GL_DATA_181920V2'[INCOME_EXP] = "ACTUAL Income"
)
)
It's better in 2 ways. First, it's a bit less to type. Second, it's more performant for 2 reasons:
1) you should not put a full table as a filter in CALCULATE if there's no real need (there seldom is),
2) KEEPFILTERS is faster.
And the golden rule of DAX says: Never filter a table when you can filter a column.
All these things can be discovered through www.sqlbi.com, the site by The Italians.
Best
D
@Anonymous
Try this measure
2019-20 ACTUAL Income EXCL 100 =
CALCULATE (
[2019-20 Totals],
FILTER (
'BIGL_BSCC_DATA_181920',
NOT ( BIGL_BSCC_DATA_181920[ACCT_CATEGORY] IN { "100" } )
),
FILTER (
'BIGL_GL_DATA_181920V2',
'BIGL_GL_DATA_181920V2'[INCOME_EXP] IN { "ACTUAL Income" }
)
)
If this is not working, please share sample dataset and logic of [2019-20 Totals]
Did I answer your question? Mark my post as a solution!
Appreciate with a kudos 🙂
A better formulation of your measure is this:
2019-20 ACTUAL Income EXCL 100 =
CALCULATE (
[2019-20 Totals],
KEEPFILTERS(
BIGL_BSCC_DATA_181920[ACCT_CATEGORY] <> "100"
),
KEEPFILTERS(
'BIGL_GL_DATA_181920V2'[INCOME_EXP] = "ACTUAL Income"
)
)
It's better in 2 ways. First, it's a bit less to type. Second, it's more performant for 2 reasons:
1) you should not put a full table as a filter in CALCULATE if there's no real need (there seldom is),
2) KEEPFILTERS is faster.
And the golden rule of DAX says: Never filter a table when you can filter a column.
All these things can be discovered through www.sqlbi.com, the site by The Italians.
Best
D
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
47 | |
24 | |
20 | |
15 | |
13 |
User | Count |
---|---|
55 | |
48 | |
43 | |
19 | |
19 |