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

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

Reply
Anonymous
Not applicable

Sum all values within a period and display blank out of the period

Hello

How can I sum a total value within some weeks, and display the "total" only on the defined weeks , and show blank on other weeks ?

I have tried > caculate ( sum (sales value),  filter( Allselected(table), year_week>=202201 && year_week <=202204)) , but it showed the total on all weeks in the year.

below is what I would like to achive :

week; value

40: blank

...

51; blank

52; blank

1;  100

2;  100

3;  100

4;  100

5;  blank

...; blank

 

thanks in advance

 

4 REPLIES 4
Anonymous
Not applicable

Hi @Anonymous ,

 

Any updates?

 

If any of the reply above could solve your issue, please kindly Accept it as the solution. More people will benefit from it. Or if you are still confused about it, please provide me with more details about your table and your problem or share me with your pbix file after removing sensitive data.

 

Best Regards,
Eyelyn Qin

TheoC
Super User
Super User

Hi @erche3 

 

You can create a Calculated Column and use IF ( AND ...  BLANK() ) to solve this like below:

 

TheoC_0-1644302417384.png

 

 

Outside of Parameters = IF ( AND ( 'Table'[Date] < DATE ( 2022 , 4 , 30 ) , 'Table'[Date] < DATE ( 2022 , 12 , 15 ) ) , 'Table'[Amount] , BLANK() )

 

Ensure to modify the Table and Column name to suit your data and also adjust the dates as you require using the YYYY , MM , DD approach.

 

All the best 🙂

 

Theo 

If I have posted a response that resolves your question, please accept it as a solution to formally close the post.

Also, if you are as passionate about Power BI, DAX and data as I am, please feel free to reach out if you have any questions, queries, or if you simply want to connect and talk to another data geek!

Want to connect?www.linkedin.com/in/theoconias

Anonymous
Not applicable

Hi @Anonymous ,

 

Please remove the ALLSELECTED() :

Measure = CALCULATE(SUM('Table'[Value]),FILTER('Table',[year_week]>=202201 && [year_week]<=202204))

Eyelyn9_0-1644302048506.png

 

Best Regards,
Eyelyn Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

TheoC
Super User
Super User

Hi @Anonymous 

 

You can create a Calculated Column and use IF ( AND ...  BLANK() ) to solve this like below:

 

TheoC_0-1643869889430.png

 

Outside of Parameters = IF ( AND ( 'Table'[Date] < DATE ( 2022 , 4 , 30 ) , 'Table'[Date] < DATE ( 2022 , 12 , 15 ) ) , 'Table'[Amount] , BLANK() )

 

Ensure to modify the Table and Column name to suit your data and also adjust the dates as you require using the YYYY , MM , DD approach.

 

All the best 🙂

Theo 

 

If I have posted a response that resolves your question, please accept it as a solution to formally close the post.

Also, if you are as passionate about Power BI, DAX and data as I am, please feel free to reach out if you have any questions, queries, or if you simply want to connect and talk to another data geek!

Want to connect?www.linkedin.com/in/theoconias

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors
Top Kudoed Authors