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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
MrMani
Frequent Visitor

First target from cumulative total

Need to help to find the first target from cumulative total.

and then highlight the months to achieve target

 

Lets set Target as 15

Measures:

"Pts Run" is a cumulative total

"Pts Tgt" = MIN (Pts Run,15)

 

Expected out put 

For id 1, it's acheived on April, Flag value is "Y" till April, remaining months to be marked as "N"

For id 2, it's acheived on March,Flag value is "Y" till March, remaining months to be marked as "N"

 

MrMani_1-1721178201250.png

Unable to upload the sample pbix file. Pls find the details

 

Sample Data:

Table Name: Sample

iddtpts
11/1/20243
12/1/20244
13/1/20242
14/1/20247
15/1/20246
16/1/20242
21/1/20246
22/1/20244
23/1/20247
24/1/20241
25/1/20243
26/1/20245

 

Calendar table

Calendar = CALENDAR(MIN('Sample'[dt]),MAX('Sample'[dt]))
 
Measures:
 
Pts = SUM('Sample'[pts])
Pts Run = CALCULATE([Pts], ALLSELECTED('Calendar'[Date]),'Calendar'[Date]<=MAX('Calendar'[Date]))
Pts Tgt = MIN([Pts Run],15)
Pts Flg = if([Pts Tgt]<=15,"Y","N")
 
MrMani_0-1721179444756.png

 

 

1 ACCEPTED SOLUTION
Jihwan_Kim
Super User
Super User

Hi,

I am not sure if I understood the question correctly, but please check the below picture and the attached pbix file.

Jihwan_Kim_1-1721188300227.png

 

 

Jihwan_Kim_0-1721188284039.png

 

INDEX function (DAX) - DAX | Microsoft Learn

 

 


If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.

View solution in original post

2 REPLIES 2
Jihwan_Kim
Super User
Super User

Hi,

I am not sure if I understood the question correctly, but please check the below picture and the attached pbix file.

Jihwan_Kim_1-1721188300227.png

 

 

Jihwan_Kim_0-1721188284039.png

 

INDEX function (DAX) - DAX | Microsoft Learn

 

 


If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.

@Jihwan_Kim 

 

Thank you so much.

First month target acheived approach worked great in my model.

Appreciate your guidance.

 

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

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