I would like to create a column using dax that gives me a count of payroll, starting over each year and increasing semi-monthly on the 1st and 16th of each month. For example, the date table will show:
Go to Solution.
VAR Base_ = (2 * ( MONTH ( CalendarTable[Date] ) - 1 )) + 1
SWITCH (TRUE ();
DAY ( CalendarTable[Date] ) < 16; Base_;
Base_ + 1
View solution in original post
Try this for a calculated column:
VAR Base_ = (2 * ( MONTH ( Table1[Date] ) - 1 )) + 1
DAY ( Table1[Date] ) < 16, Base_,
Base_ + 1
Thanks for the response @AlB . I tried this, but I got this error:
"Failed to resolve name 'Base_'. It is not a valid table, variable, or function name."
This worked, thanks so much! I've never come across something like this before. It's a really interesting and creative solution.
Kudos to you if you earned one of these! Check your inbox for a notification.
Learn about the award-winning innovation that was implemented across Microsoft’s Business Applications Communities.
Find out where you can attend!