Forum Discussion
Number of Days between two dates split by month - Employee Data
Hi DummyBIDev,
I guess you need something like the measure below in the model where your fact table is not related to your calendar table.
You can check how it works in the attached file.
Best Regards,
Alexander
I've downloaded the file but i can see your file has the same issue. The total figure of 48 is incorrect if you sum up all the individual values of the "Counter" column
- barritown2 years ago
Solution Sage
Agree, my arithmetic skills are in decline. 😅
I can propose another measure on top of the earlier one:
Result = IF ( ISFILTERED ( 'Date'[Month] ), [Counter], VAR _tbl = ADDCOLUMNS ( CROSSJOIN ( VALUES ( 'Date'[Month] ), 'Data Table' ), "Temp", [Counter] ) RETURN SUMX ( _tbl, [Temp] ) )- DummyBIDev2 years agoFrequent Visitor
Hi Thanks for sending this. In isolation this works perfectly, however as soon as i add a slicer to the report and filter for one specific month it goes back to the counting the number of days in the calendar rather than sickness days.
- barritown2 years ago
Solution Sage
Hi, yup, the solution was not universal.
You filter months and what else?