Forum Discussion
Using MMM-YY with a Year value
- 5 years ago
I cannot make this work because (I think) my data is not arranged in the same way as the example.
In the end, I came up with a cheat as follows:
CALCULATE(SUM([Rate]),DATESINPERIOD('Calendar'[Date], MIN('Calendar'[Date]),-12,MONTH))
Not very elegant but seems to do what I wanted.
Hello OuluChris
you could also create a year-table and use this for the relationship of your rates- and calendar-table
If this post helps or solves your problem, please mark it as solution (to help other users find useful content and to acknowledge the work of users that helped you)
Kudoes are nice too
Have fun
Jimmy
I tried that but I couldn't make it work.
I extracted the year column from the rates table and deleted duplicates. I then linked that year table to the rates table and to the calendar table.
When I select a Month-Year value in a pivot table there aren't any values shown. All the values are in a (blank) field.
- Jimmy8015 years agoCommunity Champion
Hello OuluChris
what values you would like to show? The rates value?
Then you probably need a custom measure.
here the measure
Rates:=CALCULATE(sum(Rates[Rate]);filter(values(Rates[Year]);COUNTROWS(RELATEDTABLE('Calendar'))>0))Here my data
here my datamodel
If this post helps or solves your problem, please mark it as solution (to help other users find useful content and to acknowledge the work of users that helped you)
Kudoes are nice too
Have fun
Jimmy- OuluChris5 years agoHelper I
My data looks like this which means that the relationships can't flow in the direction you showed and therefore it doesn't work.
Chris
- Jimmy8015 years agoCommunity Champion
Hello OuluChris
it can flow. Just use the measure in my post. And see my outcome as well, it's working
If this post helps or solves your problem, please mark it as solution (to help other users find useful content and to acknowledge the work of users that helped you)
Kudoes are nice too
Have fun
Jimmy