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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
PBI5851
Helper V
Helper V

Adding Targets to Matrix

Hello,

Please can you help me in adding target to the matrix. I tried to add a measure as Target =2 and it works for individual records but it does not sum and in the total it shows as 2 rather than summarized. Not sure how else to add this target. 

 

My raw data as

TMRDOrdIDOrdStatusOrdStatusDateRegion
John SmithSteve TannerABC123Entered1/1/2022West
John SmithSteve TannerABC123Shipped1/5/2022West
John SmithSteve TannerABC123Complete2/10/2022West
John SmithSteve TannerABC234Entered1/1/2022West
John SmithSteve TannerABC234Shipped1/10/2022West
John SmithSteve TannerABC234Complete1/15/2022West
John SmithSteve TannerABC345Entered2/5/2022NW
John SmithSteve TannerABC345Shipped2/7/2022NW
John SmithSteve TannerABC345Complete2/10/2022NW
Mary JaneBridget FDEF123Entered2/5/2022East
Mary JaneBridget FDEF123Shipped2/5/2022East
Mary JaneBridget FDEF123Complete2/5/2022East
Brad MarleyJohn QEFG123Entered2/16/2022East
Brad MarleyJohn QEFG123Entered2/16/2022East
Brad MarleyJohn QEFG123Entered2/16/2022East
Brad MarleyJohn QEFG234Entered2/16/2022West
Brad MarleyJohn QEFG234Entered2/16/2022West
Brad MarleyJohn QEFG234Entered2/16/2022West

 

Expected to have two outputs. When adding region, though John Smith shows up twice, he still has a target of 2 per region and when region is not displayed, he is still supposed to have 2 as the target.  And the totals should sum up correctly. 

 

Output 1:

 TMRegionComplete CountComplete Target
 John SmithWest22
 Mary JaneEast12
 John SmithNW12
 Brad MarleyEast12
 Brad MarleyWest12
Total  610

 

Output 2:

 TMComplete CountComplete Target
 John Smith32
 Mary Jane12
 Brad Marley22
Total 66
1 ACCEPTED SOLUTION
HoangHugo
Solution Specialist
Solution Specialist

Hi, maybe I misunderstand you, please try this one

 

complete_target =

  var target = 2

  return SUMX(SUMMARIZE(datatable,TM column),target)

 

View solution in original post

3 REPLIES 3
PBI5851
Helper V
Helper V

@HoangHugo It is not working as it is summing up every single occurence. 

HoangHugo
Solution Specialist
Solution Specialist

Hi, maybe I misunderstand you, please try this one

 

complete_target =

  var target = 2

  return SUMX(SUMMARIZE(datatable,TM column),target)

 

HoangHugo
Solution Specialist
Solution Specialist

Hi,

try this one

 

measure

complete_target =

  var target = 2

  return SUMX(datatable,target)

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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