cancel
Showing results for
Did you mean:
Helper III

## Dax question

Hi

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

@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: https://community.powerbi.com/t5/Community-Blog/Power-BI-Distributing-Allocating-the-Yearly-Target-C...

Proud to be a Super User!

Announcements

#### 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.

#### Microsoft named a Leader in The Forrester Wave

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

#### 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
Top Kudoed Authors