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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
joshua1990
Post Prodigy
Post Prodigy

COUNT number of weeks below Budget

Hi experts!

I have a simple sales table that is linked with a calendar table.

Now I would like to count the number of weeks - visualized in a matrix - if the sales a below value X.

How is this possible by using a DAX Measure?

1 ACCEPTED SOLUTION
Whitewater100
Solution Sage
Solution Sage

Hello:

Please see attached link:

https://drive.google.com/file/d/1nSYF-2FkKHMoz2lZtQdBd_V-ijP-A_w7/view?usp=sharing 

 

It's just several measures:

After sum up Sales and budget:

Budget Variance = [Total Sales] -[Total Budget]
Then
Weeks Under Budget = COUNTROWS(
FILTER(ALL(Dates[Week No]),
[Budget Variance] < 0))

 

View solution in original post

3 REPLIES 3
Whitewater100
Solution Sage
Solution Sage

Hello:

Please see attached link:

https://drive.google.com/file/d/1nSYF-2FkKHMoz2lZtQdBd_V-ijP-A_w7/view?usp=sharing 

 

It's just several measures:

After sum up Sales and budget:

Budget Variance = [Total Sales] -[Total Budget]
Then
Weeks Under Budget = COUNTROWS(
FILTER(ALL(Dates[Week No]),
[Budget Variance] < 0))

 

Ok, that works fine. But what is, if I want to show the number of weeks above and below the target in the same visual for a selected year?

Yes you can do that. You also can show a weekly column chart calling out the overs/unders. A card visual can show both answers. 

If you have some data, that has multiple years by week and slaes & budget, I can show you.

Is this what you'd like?

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 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.