Forum Discussion
Measure not calculating all rows on a table
- 4 years ago
I got it to work correctly by changing the relationship between the two tables to a One to Many (the slicer date calendar being the one).
Now that I've copied the technique to the actual project I'm working on, it yields mixed results - as you can see from the below screenshot, some rows that should have 1s have 0s, even when they have the identical start/end dates as rows with 1s. Do you have any idea what's causing this?
Thanks
Hi JB
if you delete CALCULATE along with its modifiers it should work
- JB4 years ago
Helper II
It does, but once I complicate things by adding a date slicer to determine the Week Ending date, it continues to return 1 even for rows that should be 0.
- tamerj14 years ago
Community Champion
Can you please share the code for both Saturday Prior and Week Ending measures?
- JB4 years ago
Helper II
It's supposed to work with a slicer that's connected to a date table consisting exclusively of Fridays.
var WE = SELECTEDVALUE('Slicer Calendar'[Week Ending]) var SP = (SELECTEDVALUE('Slicer Calendar'[Week Ending])-6)I disabled the slicer from interacting with the table and, as you can see above, it returns the Friday and Saturday dates for the week specified in the Start Date column.
I assume that these are not the source of the problem since they are correctly calling out valid dates, so the calculation has a legitimate date range to work with.