Forum Discussion
jvandyck
5 years agoHelper IV
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.
1 Reply
- amitchandakSuper User
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-Convert-to/ba-p/1476400