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

How can I show monthly target attainment?

Hi PBI Experts! 

I have three tables - transactions, monthly target and object type (see screenshots below) and I need to determine if the objects are achieving monthly target. How can I do that? I also need to show the cummulative attainment if multiple months are selected in slicer. Category 1 & 2 are category in the second table. Thank you in advance!!!

SuperJK5088_0-1723054308480.png

SuperJK5088_1-1723054333053.png

SuperJK5088_2-1723054347583.png

 

 

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Thank you Ashish_Mathur and lbendlin 

Hi, @SuperJK5088 

Based on the data you provided, I use the following DAX expression to find the Monthly attainment:

 

monthly attainment = CALCULATE(
     COUNTROWS('transactions'),
     FILTER('transactions',
     'transactions'[Transaction Date]>=STARTOFMONTH('transactions'[Transaction Date])&&
     'transactions'[Transaction Date]<=ENDOFMONTH('transactions'[Transaction Date])
     )
)

 

I created a target using the following DAX expression to fetch the target values for the corresponding category and tag:

 

Target = 
VAR _tag= SELECTEDVALUE(transactions[Tag 1])
VAR _category1 = SELECTEDVALUE(transactions[Category 1])
VAR _target_value = MAXX(FILTER('monthly target','monthly target'[Tag 1]=_tag&&'monthly target'[Category]=_category1),'monthly target'[Target])
RETURN _target_value

 

 I use the following DAX expression to determine if the current monthly attainment is reaching the target:

 

Is meet target = IF([monthly attainment]>[Target],"Yes","No")

 

 The final result is as follows:

vjianpengmsft_1-1723467186119.png

When I select multiple months in the slicer, I do a monthly attainment with a rollover:

vjianpengmsft_2-1723467247597.png

vjianpengmsft_3-1723467266062.png

I've provided the PBIX file used this time below.

 

Best Regards

Jianpeng Li

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

4 REPLIES 4
Anonymous
Not applicable

Thank you Ashish_Mathur and lbendlin 

Hi, @SuperJK5088 

Based on the data you provided, I use the following DAX expression to find the Monthly attainment:

 

monthly attainment = CALCULATE(
     COUNTROWS('transactions'),
     FILTER('transactions',
     'transactions'[Transaction Date]>=STARTOFMONTH('transactions'[Transaction Date])&&
     'transactions'[Transaction Date]<=ENDOFMONTH('transactions'[Transaction Date])
     )
)

 

I created a target using the following DAX expression to fetch the target values for the corresponding category and tag:

 

Target = 
VAR _tag= SELECTEDVALUE(transactions[Tag 1])
VAR _category1 = SELECTEDVALUE(transactions[Category 1])
VAR _target_value = MAXX(FILTER('monthly target','monthly target'[Tag 1]=_tag&&'monthly target'[Category]=_category1),'monthly target'[Target])
RETURN _target_value

 

 I use the following DAX expression to determine if the current monthly attainment is reaching the target:

 

Is meet target = IF([monthly attainment]>[Target],"Yes","No")

 

 The final result is as follows:

vjianpengmsft_1-1723467186119.png

When I select multiple months in the slicer, I do a monthly attainment with a rollover:

vjianpengmsft_2-1723467247597.png

vjianpengmsft_3-1723467266062.png

I've provided the PBIX file used this time below.

 

Best Regards

Jianpeng Li

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

lbendlin
Super User
Super User

Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).

Do not include sensitive information or anything not related to the issue or question.

If you are unsure how to upload data please refer to https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-...

Please show the expected outcome based on the sample data you provided.

Want faster answers? https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447...

Hi lbendlin, thank you! Please see sample data attached. 

Object IDCategory 1Category 2
2236215
2236826
2237048
2238515
22977210
23424310
3127137
3127237

 

Object IDTransaction IDTransaction DateTag 1Category 1Category 2
22362112667891/5/2024 0:00215
22368116846415/3/2024 0:00326
22977116239344/17/2024 0:001210
22977120073608/6/2024 0:002210
31272118288885/31/2024 0:00237
22362119432967/14/2024 0:00215
22362119796727/27/2024 0:00215

 

frequencyCategoryTag 1Target
month1124
month1216
month13122
month2124
month2216
month2399
month3112
month324
month335

Hi,

Show the expected result very clearly.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

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!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.