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
hariepermana
Frequent Visitor

set target goals value always show lastday of the month

Hello expert,

 

i've a data (sales amount) on my database and i update it everyday.

i make a kpi card and i wanna compare every sales amount (everyday) with monthly target. the problem is, i've date measure on my page and everytime i drag it day by day, it wont compare with monthly target (show blank) except i drag it on a last day of the month.

 

can you help me, which kind of DAX can solve my problem.

and here my sample data

1. Table Sales

    date | amount_sales

    2020-10-01 | 100

    2020-10-02 | 200
    2020-10-03 | 300
2. Table target_goals
    date | amount_target

    2020-10-31 | 2000
3. Table master_calendar

and here my latest DAX (target goals)

target_amount = VAR latestDate = MAX('master_calendar'[date]) RETURN CALCULATE(SUM('target_goals'[amount_target]),'target_goals'[date]=latestDate)


i appreciate every help
thank you

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@hariepermana , For target you can use closingbalancemonth and date table. As that is saved on last date.

 

That has been discussed in details in my video :https://youtu.be/yPQ9UV37LOU

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

2 REPLIES 2
amitchandak
Super User
Super User

@hariepermana , For target you can use closingbalancemonth and date table. As that is saved on last date.

 

That has been discussed in details in my video :https://youtu.be/yPQ9UV37LOU

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

@amitchandak , thank for your suggestion, it 100% work!

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

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

November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

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.