Forum Discussion
Difference between 2 columns in a Matrix Table - DAX Help ASAP
- 9 years ago
Hi all,
In case anyone has a similar issue. there is a pretty simple fix. Instead of Using Month.No I should have used [Date].[Date] in all of the formulas.
I apologies for wasting all of your time on this.
Thanks,
Boycie92
Hi Boycie92,
Columns
- Headcount
- Month = [Date].[MonthNo]
According to your description, I would suggest you to create a new calculate column called "YearMonth" like below, then use "YearMonth" column instead of "Month" column for the calculation in all your measures mentioned above(keep the logic part), then it should work as expected.:smileyhappy:
YearMonth=[Date].[Year]*100 + [Date].[MonthNo]
Regards
Hi Anonymous
Thanks for the reply.
I have used your solution and I have encountered a problem:
- When comparing later months with each other I am encountering an issue were Departments that are no longer in use show the first headcount (April) figure available.
For example:
Department 1
MinMonthHC = April 2016 MaxMonthHC = September 2016 Diff
200 200 0
When it should be
MinMonthHC = April 2016 MaxMonthHC = September 2016 Diff
200 0 -200
However it works fine in months when the Department are still active.
It could be the way I have altered the measures? If you have any suggestions I would greatly appreciate it.
Thanks,