Forum Discussion
DAX Reorder
Hi Greg_Deckler
Reordered outlets values which were mentioned above table are not exact values. it varies with repeated customer/outlets. week no 1 Reordered outlets is zero because those customers are fresh. there is no point of repeated customers. week no 2 Reordered outlets are 100 (as mentioned in table but this values can vary) i.e in week no 2 total unique no of outlets are are 140 and out of this 140 unique outles how many outlets has been repated from previous week 120 unique outlets.
week no 3 Reordered outlets are 120 (as mentioned in table but this values can vary) i.e in week no 3 total unique no of outlets are are 180 and out of this 180 unique outles how many outlets has been repated from previous week 140 unique outlets
week no 4 Reordered outlets are 160 (as mentioned in table but this values can vary) i.e in week no 4 total unique no of outlets are are 205and out of this 205 unique outles how many outlets has been repated from previous week 180 unique outlets.
Please let me know if you need to to know anything else to understand.
Thanks.
Hi,
Please try these two measures:
Reordered outlets =
IF (
MAX ( 'Table'[weekno] ) - 1 = 0,
0,
CALCULATE (
MAX ( 'Table'[no of unique outlets] ),
FILTER (
ALLSELECTED ( 'Table' ),
'Table'[weekno]
= MAX ( 'Table'[weekno] ) - 1
)
) - 20
)Reorder rate =
IF (
MAX ( 'Table'[weekno] ) - 1 = 0,
0,
( [Reordered outlets] - 20 ) / [Reordered outlets]
)The result shows:
Here is my test pbix file:
Hope this helps.
Best Regards,
Giotto
- Anonymous6 years agoNot applicable
HI v-gizhi-msft
The Reordered outlets doesnt have to show the exact values as 100, 120, 160. it varies with the repeated occrence. could you please tell me why did you do - 20 in above dax
week no 2 Reordered outlets are 100 (as mentioned in table but this values can vary) i.e in week no 2 total unique no of outlets are are 140 and out of this 140 unique outles how many outlets has been repated from previous week 120 unique outlets.
week no 3 Reordered outlets are 120 (as mentioned in table but this values can vary) i.e in week no 3 total unique no of outlets are are 180 and out of this 180 unique outles how many outlets has been repated from previous week 140 unique outlets
week no 4 Reordered outlets are 160 (as mentioned in table but this values can vary) i.e in week no 4 total unique no of outlets are are 205and out of this 205 unique outles how many outlets has been repated from previous week 180 unique outlets.
- v-gizhi-msft6 years agoCommunity Support
- Anonymous6 years agoNot applicable
Hi v-gizhi-msft ,
could you please review the logic agian. my logic is as given below.
i want to count the no of unique outlets repeating stores based on current week to previous week. i.e the current week no of unique outlets that are repeated from previous week.
Thanks