Reply
avatar user
Anonymous
Not applicable
Partially syndicated - Outbound

DAX Reorder

Hi,

 

sample.JPG                                                                          i have to write the measure for Reordered outlets i.e.                                                                                                                               for week 1 The Reorder outlets  value is 0 as it has the fresh outlets.                                                                                                  and for week 2 the Reorder outlets value is 100 i.e. The 140 outlets that has been repeated in the previous week outlets i.e. 120      and for week 3 the  Re odrder outlets value is 120 i.e. The 180 outlets that has been repeated in the previous week outlets i.e. 140  and for week 4  Re order outlets  the value is 160 i.e. the 205 outlets that has been repeated in the previous week outlets i.e. 180       

Reordered rate is current week Reordered outelets / previous week no of unique outlets * 100                                                                   

 

can anyone help in writing dax for Reordered outlets  and Reordered rate 

 

Thank you.

8 REPLIES 8
avatar user
Anonymous
Not applicable

Syndicated - Outbound

Hi,

 

Capture.JPG

Reordered outlets values which were mentioned above table are not exact values. it varies with repeated occrence of 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 205 and out of this 205 unique outles how many outlets has been repated from previous week 180 unique outlets.                      

Reordered rate is (current week Reordered outelets / previous week no of unique outlets) * 100

 

can anyone help me in writing dax for Reordered outlets  and Reordered rate.

 

Thanks

Syndicated - Outbound

@Anonymous , this file can help you deal with last week using Rank. But for other calculations we need sample data

 

https://www.dropbox.com/s/d9898a48e76wmvl/sales_analytics_weekWise.pbix?dl=0

 

Can you share sample data.

 

 

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Greg_Deckler
Super User
Super User

Syndicated - Outbound

I do not understand how you are getting your Reordered outlets numbers.

 

Please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Power BI Cookbook Third Edition (Color)

DAX is easy, CALCULATE makes DAX hard...
avatar user
Anonymous
Not applicable

Syndicated - Outbound

Hi @Greg_Deckler                                                                                                                                                                                           Capture.JPG

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.

Syndicated - Outbound

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:

33.PNG

Here is my test pbix file:

pbix 

Hope this helps.

 

Best Regards,

Giotto

avatar user
Anonymous
Not applicable

Syndicated - Outbound

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.

Syndicated - Outbound

Hi,

 

I reviewed your logic and test as below:

pbix 

Hope this helps.

 

Best Regards,

Giotto

avatar user
Anonymous
Not applicable

Syndicated - Outbound

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

avatar user

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

Check out the February 2025 Power BI update to learn about new features.

Feb2025 NL Carousel

Fabric Community Update - February 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors (Last Month)
Top Kudoed Authors (Last Month)