Forum Discussion
Dynamically change measure for first date
- 6 years ago
how do you store the week identyfier in your data? If it's a date then you just can count the days in the calendar table
If it's something like W01, W02, etc.. yhen you can create reference table that would store the the value, e.g. like this:
W01 4 W02 7 W03 7 W04 7 this way you don't need and IF statement in your measure, you just reference value from the table
StachuI am not sure what you would me by counting the days in a given week? Can you elaborate on that? So, I always need the denominator to be 7 except for the weeks that are cut off. So when climbing back up the hierarchy to month and quarter, the denominator still needs to be 7. So would this type of solution work there too?
Thanks for the suggestion, once I understand a little better, hopefully I can implement it and it will work!
Ryan
how do you store the week identyfier in your data? If it's a date then you just can count the days in the calendar table
If it's something like W01, W02, etc.. yhen you can create reference table that would store the the value, e.g. like this:
| W01 | 4 |
| W02 | 7 |
| W03 | 7 |
| W04 | 7 |
this way you don't need and IF statement in your measure, you just reference value from the table