cancel
Showing results for
Did you mean:

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

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

5 REPLIES 5
Community Support

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
)
)
)``````

If this post helps, then please consider Accept it as the solution to help the other members find it.
Helper I

@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

 Date WeekNUM 6/9/2020 24 6/10/2020 24 6/11/2020 24 6/14/2020 25 6/15/2020 25 6/16/2020 25 6/17/2020 25 6/18/2020 25 6/20/2020 25 6/21/2020 26 6/22/2020 26
Community Support

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

If this post helps, then please consider Accept it as the solution to help the other members find it.
Helper I

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 ID Date 244128 4/7/2020 244133 4/16/2020 244140 4/16/2020 244143 4/16/2020 244146 4/16/2020 244149 6/14/2020 244153 4/9/2020 244155 4/14/2020 244158 4/16/2020 244159 6/14/2020 244179 4/16/2020 244190 4/15/2020 244211 4/18/2020 244214 4/14/2020 244216 4/14/2020 244229 6/4/2020 244234 5/7/2020 244240 6/10/2020 244241 6/22/2020 244242 4/18/2020 244251 4/29/2020 244255 4/2/2020 244258 4/9/2020 244271 4/15/2020 244272 4/18/2020 244273 4/18/2020 244280 6/18/2020 244281 4/15/2020 244321 4/18/2020 244326 4/15/2020 244331 4/18/2020 244336 4/18/2020 244341 4/18/2020 244355 6/4/2020 244362 4/7/2020 244393 6/22/2020 244406 5/7/2020 244420 6/15/2020 244424 4/18/2020 244425 4/18/2020 244430 4/18/2020 244435 4/18/2020 244455 5/5/2020 244467 4/18/2020 244473 6/18/2020 244476 4/13/2020 244477 4/18/2020 244481 4/5/2020 244482 4/18/2020 244485 5/31/2020 244492 4/18/2020 244504 6/15/2020 244514 5/31/2020 244519 4/18/2020 244527 4/29/2020 244569 4/18/2020 244571 5/10/2020 244581 4/18/2020 244587 6/18/2020 244588 4/27/2020 244594 4/9/2020 244600 5/20/2020 244626 5/21/2020 244628 6/7/2020 244639 5/5/2020 244654 5/31/2020 244670 6/18/2020 244673 6/8/2020 244698 6/16/2020 244816 6/15/2020 244822 4/18/2020 244851 6/21/2020 244853 5/31/2020 244889 6/21/2020 244902 4/13/2020 244914 6/21/2020 244916 4/1/2020 244926 5/12/2020 244937 6/21/2020 244951 6/18/2020 244953 4/18/2020 244995 4/18/2020 245026 5/5/2020 245031 6/4/2020 245033 4/18/2020 245063 5/19/2020 245078 4/18/2020 245147 6/21/2020 245159 4/18/2020 245191 4/18/2020 245225 4/18/2020 245747 4/9/2020 245812 4/9/2020 245819 6/17/2020 245828 4/1/2020 245846 5/10/2020 245850 6/16/2020 245853 4/20/2020 245874 4/25/2020 245895 4/8/2020 245915 6/2/2020 245938 5/11/2020 245981 4/21/2020 245993 5/16/2020 246139 4/29/2020 294221 5/21/2020 296089 4/18/2020 296092 4/14/2020 296099 6/14/2020 296103 4/14/2020 296136 5/20/2020 296162 4/14/2020 296362 6/4/2020 296392 6/9/2020 297101 4/29/2020 297121 4/1/2020 297131 4/25/2020 298877 4/18/2020 298909 4/18/2020 298916 4/18/2020 298937 4/18/2020 298938 6/8/2020 298944 5/11/2020 298950 5/10/2020 298958 5/5/2020 298959 6/4/2020 298961 4/18/2020 298965 6/15/2020 299183 4/1/2020 302243 4/18/2020 302247 5/10/2020 302250 4/18/2020 302252 4/18/2020 302255 5/17/2020 302259 6/14/2020 302265 4/18/2020 302293 4/7/2020 302298 4/14/2020 302301 4/9/2020 302305 4/2/2020 302307 4/18/2020 302323 4/15/2020 302340 4/18/2020 302344 5/3/2020 302351 4/7/2020 302353 4/18/2020 302370 4/18/2020 302379 5/10/2020 302386 4/18/2020 302390 5/3/2020 302393 4/18/2020 302395 4/18/2020 302407 4/18/2020 302408 6/8/2020 302410 6/8/2020 302430 6/15/2020 302442 4/18/2020 302447 5/10/2020 302455 5/19/2020 302465 4/18/2020 302468 4/18/2020 302471 4/18/2020 302475 4/9/2020 302484 6/18/2020 302493 4/2/2020 302510 5/5/2020 302520 5/20/2020 302524 4/18/2020 302529 5/10/2020 302540 4/29/2020 302544 5/10/2020 302545 4/18/2020 302553 4/18/2020 302562 4/29/2020 302569 5/31/2020 302586 5/10/2020 302594 5/3/2020 302619 5/5/2020 302622 6/11/2020 302650 4/29/2020 302652 4/18/2020 302671 4/18/2020 302672 4/18/2020 302676 5/10/2020 302686 5/10/2020 302696 4/18/2020 302705 4/18/2020 302720 6/21/2020 302721 6/22/2020 302735 5/20/2020 302736 4/18/2020 302745 5/17/2020 302761 5/3/2020 302787 5/5/2020 302790 5/31/2020 302791 6/9/2020 302799 4/18/2020 302815 4/5/2020 302817 4/5/2020 302839 4/18/2020 302846 4/18/2020 302847 4/18/2020 302889 4/18/2020 302938 4/5/2020 302941 6/22/2020 302954 4/18/2020 302967 6/18/2020 303011 5/5/2020 303060 4/18/2020 303061 6/21/2020 303096 4/18/2020 303097 4/18/2020 303161 4/18/2020 303215 6/10/2020 304094 4/22/2020 305231 5/21/2020 305300 5/31/2020 306168 5/30/2020 306173 6/20/2020 306180 5/11/2020 306182 4/18/2020 308711 4/18/2020 309025 5/17/2020 309029 6/2/2020 309522 4/21/2020 309523 4/18/2020 309524 4/5/2020 309556 5/19/2020 309557 5/20/2020 309558 5/13/2020 309726 4/18/2020 309727 5/12/2020 309728 4/2/2020 316390 6/4/2020 316391 6/4/2020 316392 5/31/2020 316393 6/4/2020 316511 6/10/2020 316670 6/11/2020 316671 6/14/2020 244291 6/22/2020 244611 4/18/2020 245996 4/29/2020 296145 6/3/2020 297119 5/13/2020 302309 4/13/2020 302478 6/15/2020 302479 6/16/2020 302716 6/10/2020 302731 5/21/2020 306178 6/18/2020 316097 6/11/2020 316098 6/15/2020

Announcements

#### Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

#### Power BI Monthly Update - July 2024

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

#### Fabric Community Update - July 2024

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

Top Solution Authors
Top Kudoed Authors