Showing results for 
Search instead for 
Did you mean: 
Helper III
Helper III

Dax question



I have a data table with region, date, bank balance and advance payment.

I have to compare the bank balance against a target. The target is the full year sum of the advance payments of the previous year, divided by 12 by 100.

This is the formula: 

Target month bank balance = calculate(SUM('Monthly Surplus'[Advance Payment]), previousyear('Date'[Date]))/12/100
I want to create a table showing year and the number of times the bank balance exceeded the target. I have tried this formula, but it does not seem to work:
Exceeded summarize = COUNTAX
SUMMARIZE('Monthly Surplus','Date'[Year],'Date'[Month],'Monthly Surplus'[Regio],"Bank Balance",sum('Monthly Surplus'[Bank Balance]),"target",calculate([Target month bank balance])),if(not isblank([Bank Balance]),[Bank Balance]>[target]))
In this last formula, it seems that the target is nog calculating and therefore counting every month.
Super User IV
Super User IV

@jvandyck , You can create a table

= row("Date", date(year(today()),1,1), "Target",calculate(SUM('Monthly Surplus'[Advance Payment]), previousyear('Date'[Date]))/12/100)


You can now use blog to deal with yearly target


#PowerBI Distributing/Allocating the Yearly Target(Convert to Daily Target): Measure ( Daily/YTD): Magic of CLOSINGBALANCEYEAR With TOTALYTD/DATESYTD:

Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
Dashboard of My Blogs !! YouTube Channel !! Connect on Linkedin

Proud to be a Super User!

Helpful resources

PBI_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

MBAS on Demand

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Get Ready for Power BI Dev Camp

Microsoft named a Leader in The Forrester Wave

Microsoft received the highest score of any vendor in both the strategy and current offering categories.

R2 (Green) 768 x 460px.png

Microsoft Dynamics 365 & Power Platform User Professionals

DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.

Top Solution Authors