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 would like to filter based on Category but category changes each year. Can I do that in measure?
I hope it's clear from the picture.
Thanks.
B.
Solved! Go to Solution.
@kap_55 Create following measure in source table
Measure =
VAR _year = MAX(Source[Year])
VAR _color = CALCULATETABLE(VALUES(Mapping[Category]),Mapping[Year]=_year)
RETURN CALCULATE(SUM(Source[Value]),Source[Category] IN _color)
As per my understanding 2017 sum of value should be 7.
@kap_55 Create following measure in source table
Measure =
VAR _year = MAX(Source[Year])
VAR _color = CALCULATETABLE(VALUES(Mapping[Category]),Mapping[Year]=_year)
RETURN CALCULATE(SUM(Source[Value]),Source[Category] IN _color)
As per my understanding 2017 sum of value should be 7.
Works awesome. Thanks.
Yes. My mistake 🙂
Let me try your solution.
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 |
---|---|
49 | |
26 | |
20 | |
15 | |
12 |
User | Count |
---|---|
57 | |
49 | |
44 | |
19 | |
18 |