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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

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
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.