

The results of your measure cannot affect what shows in the x-axis.įrom the above in your reply, you can see that the KEEPFILTER is doing its job because it's calculating a blank for 2024! It is both respecting the initial filter context of "policy year = 2024" and layering in the additional filter context of "policy year <= 2023" in, which logically will always return an empty table to calculate off. What I mean by that is the x-axis is merely displaying all the values you have for 'D Year' first, then calculating your measure to display in the y-axis. Those are two completely separate things. You have the evaluation context/filter context of the measure and you also have the x-axis labels. I think you're conflating two different things here. I am merely writing point #2 to explain why I am so confused about the CALCULATE filter NOT overwriting the original filter context when it should. I appreciate both of your efforts to help me. Our dear friends Alberto & Marco (who know everything about DAX) teach us that it DOES.Ĭlearly I am missing something significant.Įven if I use ALL or REMOVEFILTERS to explicitly remove the original FC for 'D Year', the result is the same. This filter condition explicitly overwrites the original filter context (which included 2024).Īnd yet somehow, 2024 (which should be overwritten with <= 2023) is NOT overwritten and still appears.Įither the CALCULATE filter overwrites the original FC, or it doesn't. NOTE: I realize that KEEPFILTERS needs to be used for the actual solution. If that's true (and I believe it is), then it makes no sense to me at all that 2024 is still appearing in the chart AFTER the filter condition in the CALCULATE statement overwrites it. "The important thing of note (to me, anyway) is understanding f ilter conditions in the CALCULATE function override existing filters on those fields as a default behaviour." However, you also state, and I agree 100% that: And it makes sense to me that 2024 appears in the chart BEFORE overwriting the filter context because, just as you say ( ), 2024 appears in the 'D Year' table (due to next year's estimates). So I need to KEEPFILTERS for all of the years which are the current year (e.g.

However, I'm still doing something wrong. I'm still & Thanks for the reminder to use KEEPFILTERS. More importantly, what Power BI is showing me in the second report contradicts what you are saying. In summary, not everything you are saying makes sense, but I am memorizing it anyway in hopes that it will make sense in the future. (In fact, the visuals are identical in data, except for 2024 being present in one report and absent from the other. It's not a difference in the data because it's a shared dataset. (But this wouldn't matter anyway, right? Even if the measure was different, it still couldn't possibly get rid of 2024 anyway.) It's not a difference in the measure because it's a shared dataset. It's not a filter on the visual/page/report. The thing is that there is not a single filter on the visual/page/report that pertains to this visual. However, when viewing the identical measure in report #2, 2024 is NOT there.Īs you say, " unless you add a filter to the visual/page/report, there is literally nothing you can do to remove 2024 from the x-axis through DAX". When viewing the chart in report #1, 2024 is there. The second report uses the shared dataset.įor the above thread, all of my measures & screenshots were from the first report. The first report shares its dataset so that other reports can use it. However, I am still confused by what I see. Although this doesn't make sense to me, because the year is certainly filtering the y-axis values differently for each year, I will memorize this anyway.)Ī) "the results of a measure cannot affect what shows in the x-axis".ī) "unless you add a filter to the visual/page/report, there is literally nothing you can do to remove 2024 from the x-axis through DAX".Īgain, I will memorize these things. I have always thought that X-axis labels were part of the filter context. For your patience and ongoing explanations.ġ) You are teaching me that Filter Context & X-axis labels are 2 completely different things.
