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 want to plot a measure by time and an average of that measure without a crossfilter applied. Table1 is an extract of the fact table. Table2 is a dim table. Measure 2 is supposed to be Measure 1 but ignoring any filter of Division.
table1
Feeder | Year | var1 | var2 | var3 |
1124 | 2015 | No | 11415 | 66 |
1124 | 2015 | Yes | 11415 | 66 |
1124 | 2016 | No | 5131 | 67 |
1124 | 2016 | Yes | 0 | 67 |
1124 | 2017 | No | 91 | 67 |
1124 | 2017 | Yes | 91 | 67 |
1124 | 2018 | No | 27604 | 67 |
1124 | 2018 | Yes | 27604 | 67 |
1124 | 2019 | No | 15618 | 67 |
1124 | 2019 | Yes | 14788 | 67 |
10306 | 2015 | No | 103180 | 672 |
10306 | 2015 | Yes | 96634 | 672 |
10306 | 2016 | No | 151865 | 684 |
10306 | 2016 | Yes | 141609 | 684 |
10306 | 2017 | No | 732202 | 683 |
10306 | 2017 | Yes | 310553 | 683 |
10306 | 2018 | No | 363365 | 692 |
10306 | 2018 | Yes | 126651 | 692 |
10306 | 2019 | No | 125559 | 699 |
10306 | 2019 | Yes | 123130 | 699 |
13014 | 2015 | No | 66386 | 976 |
13014 | 2015 | Yes | 29464 | 976 |
13014 | 2016 | No | 20955 | 977 |
13014 | 2016 | Yes | 20955 | 977 |
13014 | 2017 | No | 278434 | 1025 |
13014 | 2017 | Yes | 28237 | 1025 |
13014 | 2018 | No | 130810 | 1089 |
13014 | 2018 | Yes | 125353 | 1089 |
13014 | 2019 | No | 39587 | 1126 |
13014 | 2019 | Yes | 39470 | 1126 |
14346 | 2015 | No | 194526 | 1080 |
14346 | 2015 | Yes | 193932 | 1080 |
14346 | 2016 | No | 50184 | 1083 |
14346 | 2016 | Yes | 43126 | 1083 |
14346 | 2017 | No | 264205 | 1084 |
14346 | 2017 | Yes | 216948 | 1084 |
14346 | 2018 | No | 443142 | 1073 |
14346 | 2018 | Yes | 312603 | 1073 |
14346 | 2019 | No | 304466 | 1073 |
14346 | 2019 | Yes | 276003 | 1073 |
table 2
Feeder | Division |
1124 | A |
10306 | B |
13014 | C |
14346 | D |
Measure1 =
CALCULATE(
DIVIDE(
SUM('Table1'[var2]),
SUM('Table1'[var3])
),
'Table1'[var1] = "Yes"
)
Measure2=
CALCULATE(
[Measure1],
ALLEXCEPT(
'Table1',
'Table1'[Year].[Year],
'Table1'[var1]
)
)
But when I put compare measure1 and measure2, it's not ignoring the crossfilter.
Not Filtered
Year | Measure1 | Measure2 |
2019 | 152.9 | 152.9 |
2018 | 202.7 | 202.7 |
2017 | 194.4 | 194.4 |
2016 | 73.2 | 73.2 |
2015 | 118.6 | 118.6 |
Filtered
Year | Measure1 | Measure2 |
2019 | 176.2 | 176.2 |
2018 | 183 | 183 |
2017 | 454.7 | 454.7 |
2016 | 207 | 207 |
2015 | 143.8 | 143.8 |
Basically, i want to plot Mesure1 from Filtered and Measure2 from Not Filtered with DAX only. Can someone help me out? Thanks
Solved! Go to Solution.
Hi,
Does this work?
Measure2 = calculate([measure1],all('Table1'[Division]))
Hi,
Does this work?
Measure2 = calculate([measure1],all('Table1'[Division]))
I think you meant to type "table2[division], but yes, that worked. thanks
You are welcome.
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 |
---|---|
114 | |
99 | |
83 | |
70 | |
60 |
User | Count |
---|---|
150 | |
115 | |
104 | |
89 | |
65 |