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.
Dear All
Here is the situation:
I have two slicers allowing a user to select Month (MonthLong) & Year respectively. Both are columns in my calendar table
Without selecting any particular months in the month slicer the DAX expression below works fine. I get a value returned which is at a year level
However, if I select a Month I would expect the measure to respect the month filter being applied to the calendar table. It is does not and I just get the same figure at year level
Have gone about constructing the expression with best intentions but obviously missing something, help much appreciated
LY ACTUAL =
VAR LY_VAL = [LY] // derive LY value from users selection of year
RETURN
CALCULATE (
[PL_TOTAL],
DIM_DTYPE[DTYPE] = "ACT",
FILTER(ALLEXCEPT(DIM_CALENDAR, DIM_CALENDAR[MonthLong]), DIM_CALENDAR[Year]= LY_VAL )
)
Sample data to match up with your formula would be very beneficial.
I've actually found a workaround to what I needed (DATEADD) but am mystified as to why this doesn't work
I'm basically saying "don't disregard the selection in the month slicer' but it is doing. So the question would be why is ALLEXCEPT not doing what its supposed to ?
If you want to skype me it would be easier to show you
PS the reason I hold the value of a measure in a variable is because if i use the measure directly in my filter expression it doesn't work
Hi @cnewell7,
Could post your table structures(including the relationships) with some sample/mock data which can help us to reproduce this issue, so that we can help further investigate on it? It's better that you can share a sample pbix file(with just some sample/mock data) which can reproduce the issue. You can upload it to OneDrive or Dropbox and post the link here. Do mask sensitive data before uploading.
Regards
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 |
---|---|
110 | |
94 | |
80 | |
67 | |
59 |
User | Count |
---|---|
150 | |
119 | |
104 | |
87 | |
67 |