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
Anonymous
Not applicable

How to compare columns of 2 diff. summarize tables

Hello Everyone,

I have created 2 different Summarize tables using the below DAX.

Table 1:
GroupBy_Capability=
SUMMARIZECOLUMNS (
Issues[Issue Key],
FILTER ( Issues, Issues[Issue Type] ="Capability"),
"Story Points",SUM( Issues[Story Points] )
)

 

Table 2:

GroupBy_Epics =
SUMMARIZECOLUMNS (
Issues[Parent Link],Issues[Issue Key],
FILTER ( Issues, Issues[Issue Type] ="EPIC"),
"Epic Story Points",SUM(Issues[Story Points] )
)

 

 Table 1

Issue KeyStory Points
DIG-2383       88

 

 Table 2:

Parent LinkEpic Story PointsIssue Key
DG-2383            5TC-200
DG-2383           15UL-1237
DG-2383           15UL-1238

 

I have to get the difference between the Story Points in both the tables, where Table1(Issue Key)=Table2(Parent Link).

Output is 88-(5+15+15)=53.

 

How to compare the columns of Summarize tables as there is no relationship between theses tables?

Or should I go for Lookupvalue() or Relatedtable()?

How to use Summarize tables in a measure?

 

Need help  with this DAX .

 

Thanks in Advance

 

 

 

5 REPLIES 5
v-yiruan-msft
Community Support
Community Support

Hi @Anonymous ,

Whether your problem has been resolved? If yes, could you please mark the helpful post as Answered? It will help other members in the community find the solution easily if they face the similar problem with you. Thank you.

Best Regards

Rena

Community Support Team _ Rena
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
amitchandak
Super User
Super User

@Anonymous , You can create a common table Issues using Issues[Issue Key] , and join with both tables  and compare

 

or have both in table 1

 

Table 1:
GroupBy_Capability=
SUMMARIZECOLUMNS (
Issues[Issue Key],
,
"Story Points",calculate(SUM( Issues[Story Points] ),FILTER ( Issues, Issues[Issue Type] ="Capability")),
"Epic Story Points",calculate(SUM(Issues[Story Points] ),FILTER ( Issues, Issues[Issue Type] ="EPIC"))
)

 

Now you can compare.

 

Table2 can be as is

 

 

harshnathani
Community Champion
Community Champion

Hi @Anonymous ,

 

Yiu cna try this measure.

 

Pull Parentlink from Table 2

 

 

Measure = SUM(Table1[Story Points]) - SUM(Table2[Epic Story Points])

 

 

1.jpg

 

Regards,
Harsh Nathani
Did I answer your question? Mark my post as a solution! Appreciate with a Kudos!! (Click the Thumbs Up Button)

 

Anonymous
Not applicable

@harshnathani 

Thanks Harsha. I am getting the correct value in a measure. But is it possible to create a column as I understand this should be a row context.
And I have to find the difference % for each issue key and on top of that I have to do few more calculation on scoring part based on my %age value.

Hi @Anonymous ,

First, please create a relationship between Table 1 and Table 2 based on the field Issue Key and Parent Link.

relationship.jpg

Then create a measure and calculated column as below:

1). create a measure to get the capability store points    

Measure = CALCULATE(SUM('Table 1'[Story Points]))

2). Create a calculated column to get the difference between capability and EPIC type

Column = [Measure]- CALCULATE(SUM('Table 2'[Epic Story Points]),FILTER('Table 2','Table 2'[Parent Link]=EARLIER('Table 2'[Parent Link])))

If the above one is not what you want, please provide more sample data and your actual desired result with examples. Thank you.

Best Regards

Rena

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

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.