Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
HusseinKhalil
Helper I
Helper I

Passing filter in a weekly calculation measure

Good day

 

i am trying to create measure for the good sold in the current week using the below formula

 

Weekly_Sold = CALCULATE(COUNT(table[GoodSold]),FILTER(table,WEEKNUM(TODAY(),1)=WEEKNUM(MAX(table[SalesDate]),1)))

 

everytime it gives the total count of sold goods across the column, passing any filters

 

appreciate your help

5 REPLIES 5
v-eachen-msft
Community Support
Community Support

Hi @HusseinKhalil ,

 

You could refer to the following measure.

Measure =
CALCULATE (
    COUNT ( 'Table'[GoodSold] ),
    FILTER (
        'Table',
        WEEKNUM ( TODAY(), 1 )
            = WEEKNUM (
                CALCULATE (
                    MAX ( 'Table'[SalesDate] ),
                    ALLEXCEPT ( 'Table', 'Table'[GoodSold] )
                ),
                1
            )
    )
)

 

Community Support Team _ Eads
If this post helps, then please consider Accept it as the solution to help the other members find it.

@amitchandakthanks a million for the rich response, it would help me a lot in the future cases. i was just after the logic issue of my formula.

 

 

@v-eachen-msftthanks v, i tried your formula but it returned with the events of below dates

 

DateWeekNUM
6/9/202024
6/10/202024
6/11/202024
6/14/202025
6/15/202025
6/16/202025
6/17/202025
6/18/202025
6/20/202025
6/21/202026
6/22/202026

Hi @HusseinKhalil ,

 

Maybe I misunderstood your needs. You could share your expected output with files or screenshots here.

 

Community Support Team _ Eads
If this post helps, then please consider Accept it as the solution to help the other members find it.

hello @v-eachen-msft  please have a look below, i need to count goods solds based on this week and previous week for example, today the 23rd June in my region, i want to find W26 & W25 sales.

 

thanks 

 

Good Sold IDDate
2441284/7/2020
2441334/16/2020
2441404/16/2020
2441434/16/2020
2441464/16/2020
2441496/14/2020
2441534/9/2020
2441554/14/2020
2441584/16/2020
2441596/14/2020
2441794/16/2020
2441904/15/2020
2442114/18/2020
2442144/14/2020
2442164/14/2020
2442296/4/2020
2442345/7/2020
2442406/10/2020
2442416/22/2020
2442424/18/2020
2442514/29/2020
2442554/2/2020
2442584/9/2020
2442714/15/2020
2442724/18/2020
2442734/18/2020
2442806/18/2020
2442814/15/2020
2443214/18/2020
2443264/15/2020
2443314/18/2020
2443364/18/2020
2443414/18/2020
2443556/4/2020
2443624/7/2020
2443936/22/2020
2444065/7/2020
2444206/15/2020
2444244/18/2020
2444254/18/2020
2444304/18/2020
2444354/18/2020
2444555/5/2020
2444674/18/2020
2444736/18/2020
2444764/13/2020
2444774/18/2020
2444814/5/2020
2444824/18/2020
2444855/31/2020
2444924/18/2020
2445046/15/2020
2445145/31/2020
2445194/18/2020
2445274/29/2020
2445694/18/2020
2445715/10/2020
2445814/18/2020
2445876/18/2020
2445884/27/2020
2445944/9/2020
2446005/20/2020
2446265/21/2020
2446286/7/2020
2446395/5/2020
2446545/31/2020
2446706/18/2020
2446736/8/2020
2446986/16/2020
2448166/15/2020
2448224/18/2020
2448516/21/2020
2448535/31/2020
2448896/21/2020
2449024/13/2020
2449146/21/2020
2449164/1/2020
2449265/12/2020
2449376/21/2020
2449516/18/2020
2449534/18/2020
2449954/18/2020
2450265/5/2020
2450316/4/2020
2450334/18/2020
2450635/19/2020
2450784/18/2020
2451476/21/2020
2451594/18/2020
2451914/18/2020
2452254/18/2020
2457474/9/2020
2458124/9/2020
2458196/17/2020
2458284/1/2020
2458465/10/2020
2458506/16/2020
2458534/20/2020
2458744/25/2020
2458954/8/2020
2459156/2/2020
2459385/11/2020
2459814/21/2020
2459935/16/2020
2461394/29/2020
2942215/21/2020
2960894/18/2020
2960924/14/2020
2960996/14/2020
2961034/14/2020
2961365/20/2020
2961624/14/2020
2963626/4/2020
2963926/9/2020
2971014/29/2020
2971214/1/2020
2971314/25/2020
2988774/18/2020
2989094/18/2020
2989164/18/2020
2989374/18/2020
2989386/8/2020
2989445/11/2020
2989505/10/2020
2989585/5/2020
2989596/4/2020
2989614/18/2020
2989656/15/2020
2991834/1/2020
3022434/18/2020
3022475/10/2020
3022504/18/2020
3022524/18/2020
3022555/17/2020
3022596/14/2020
3022654/18/2020
3022934/7/2020
3022984/14/2020
3023014/9/2020
3023054/2/2020
3023074/18/2020
3023234/15/2020
3023404/18/2020
3023445/3/2020
3023514/7/2020
3023534/18/2020
3023704/18/2020
3023795/10/2020
3023864/18/2020
3023905/3/2020
3023934/18/2020
3023954/18/2020
3024074/18/2020
3024086/8/2020
3024106/8/2020
3024306/15/2020
3024424/18/2020
3024475/10/2020
3024555/19/2020
3024654/18/2020
3024684/18/2020
3024714/18/2020
3024754/9/2020
3024846/18/2020
3024934/2/2020
3025105/5/2020
3025205/20/2020
3025244/18/2020
3025295/10/2020
3025404/29/2020
3025445/10/2020
3025454/18/2020
3025534/18/2020
3025624/29/2020
3025695/31/2020
3025865/10/2020
3025945/3/2020
3026195/5/2020
3026226/11/2020
3026504/29/2020
3026524/18/2020
3026714/18/2020
3026724/18/2020
3026765/10/2020
3026865/10/2020
3026964/18/2020
3027054/18/2020
3027206/21/2020
3027216/22/2020
3027355/20/2020
3027364/18/2020
3027455/17/2020
3027615/3/2020
3027875/5/2020
3027905/31/2020
3027916/9/2020
3027994/18/2020
3028154/5/2020
3028174/5/2020
3028394/18/2020
3028464/18/2020
3028474/18/2020
3028894/18/2020
3029384/5/2020
3029416/22/2020
3029544/18/2020
3029676/18/2020
3030115/5/2020
3030604/18/2020
3030616/21/2020
3030964/18/2020
3030974/18/2020
3031614/18/2020
3032156/10/2020
3040944/22/2020
3052315/21/2020
3053005/31/2020
3061685/30/2020
3061736/20/2020
3061805/11/2020
3061824/18/2020
3087114/18/2020
3090255/17/2020
3090296/2/2020
3095224/21/2020
3095234/18/2020
3095244/5/2020
3095565/19/2020
3095575/20/2020
3095585/13/2020
3097264/18/2020
3097275/12/2020
3097284/2/2020
3163906/4/2020
3163916/4/2020
3163925/31/2020
3163936/4/2020
3165116/10/2020
3166706/11/2020
3166716/14/2020
2442916/22/2020
2446114/18/2020
2459964/29/2020
2961456/3/2020
2971195/13/2020
3023094/13/2020
3024786/15/2020
3024796/16/2020
3027166/10/2020
3027315/21/2020
3061786/18/2020
3160976/11/2020
3160986/15/2020

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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