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.
I am stuck on a measure which won't slice. The measure uses SUMMARIZECOLUMNS and I can get the number exprected, but when I apply a slicer it doesn't filter.
Responder | Variable | Response | Weighting | Country |
55 | 1 | 1 | 1.02 | UK |
55 | 2 | 2 | 1.02 | UK |
55 | 3 | 3 | 1.02 | UK |
55 | 4 | 1 | 1.02 | UK |
55 | 5 | 2 | 1.02 | UK |
56 | 1 | 3 | 0.99 | USA |
56 | 2 | 1 | 0.99 | USA |
56 | 3 | 4 | 0.99 | USA |
56 | 4 | 2 | 0.99 | USA |
56 | 5 | 1 | 0.99 | USA |
57 | 1 | 1 | 0.85 | UK |
57 | 2 | 1 | 0.85 | UK |
57 | 3 | 1 | 0.85 | UK |
57 | 4 | 4 | 0.85 | UK |
57 | 5 | 4 | 0.85 | UK |
For each responder with a response of 1 or 2, return the distinct responder and weighting:
Responder | Weighting | Country |
57 | 0.85 | UK |
55 | 1.02 | UK |
56 | 0.99 | USA |
Then SUM = 2.86
Measure:
Solved! Go to Solution.
SUMMARIZECOLUMNS is a function to be used ONLY for queries, not for measures. https://dax.guide/summarizecolumns
This function does not respect context transition, hence using it in measures does not make any sense.
Here's probably what you want:
[Your Measure] =
CALCULATE(
SUMX(
summarize(
T,
T[Responder],
T[Weighting]
),
T[Weighting]
),
KEEPFILTERS(
// You say in the text you want
// to filter by Respose, not by
// Variable (but your formula filters
// by Variable for some reason).
T[Response] in {1, 2}
)
)
SUMMARIZECOLUMNS is a function to be used ONLY for queries, not for measures. https://dax.guide/summarizecolumns
This function does not respect context transition, hence using it in measures does not make any sense.
Here's probably what you want:
[Your Measure] =
CALCULATE(
SUMX(
summarize(
T,
T[Responder],
T[Weighting]
),
T[Weighting]
),
KEEPFILTERS(
// You say in the text you want
// to filter by Respose, not by
// Variable (but your formula filters
// by Variable for some reason).
T[Response] in {1, 2}
)
)
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 | |
23 | |
20 | |
15 | |
13 |
User | Count |
---|---|
51 | |
42 | |
39 | |
19 | |
19 |