Forum Discussion
calimero48
Helper II
8 years agoSame week previous year
Hi I have create a measure to get the sum of sale from previous year same week as IF ( HASONEVALUE (DAT[CalendarYear]), CALCULATE (SUM ([CA]), FILTER (ALL ( D...
MojoGene
Post Patron
8 years agoHere's a thought.
If you divide the sales figue by itself you will come up with one of two values: 1 or 0 (because anything divided by itself will be 1 and anything divided by zero will be zero). Then multiple the resulting value by your full measure. The result will be either 1 * [MEASURE] or 0 * [MEASURE].
This might return the sales in the current week having no sales as zero as you seem to require. (Sorry I haven't tested this.)
calimero48
Helper II
8 years agoHi
Thanks for your suggestion but my problem is that the measure of the previous year same week does not give the correct result.
the measure "previous year same week" does not include all fact table of the previous year week if, there is no sales in the current year.
Regards