Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
How to calculate value between two queries?
11-22-2017
10:07 PM
Hi Everyone,
It is hard for me to calculate like this.
Any help is appreciable. Thank you in advance!
Regards,
Kelly
Solved! Go to Solution.
2 ACCEPTED SOLUTIONS
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-22-2017
10:36 PM
Regards
Zubair
Please try my custom visuals
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-24-2017
12:21 AM
Without calculation it won't be possble.
Possibly you want to know how to do it in Power Query:
let Source = Query2, #"Merged Queries" = Table.NestedJoin(Source,{"First Level Group", "Second Level Group"},Query1,{"First Level Group", "Second Level Group"},"Query1",JoinKind.LeftOuter), #"Added Custom" = Table.AddColumn(#"Merged Queries", "Custom value", each [Reference] * Table.RowCount([Query1]), Int64.Type), #"Removed Columns" = Table.RemoveColumns(#"Added Custom",{"Reference", "Query1"}) in #"Removed Columns"
Specializing in Power Query Formula Language (M)
4 REPLIES 4
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-22-2017
10:34 PM
Hi @Kelly_Zhu
Add this calculated column in Query 2
Custom Value= Query2[Reference] * CALCULATE ( COUNTROWS ( Query1 ), FILTER ( Query1, Query1[First Level Group] = Query2[First Level Group] && Query1[Second Level Group] = Query2[Second Level Group] ) )
Regards
Zubair
Please try my custom visuals
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-23-2017
10:36 PM
Thanks a lot!
In addition, Could you tell me how to get the data without calcuation? Thanks in advance!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-24-2017
12:21 AM
Without calculation it won't be possble.
Possibly you want to know how to do it in Power Query:
let Source = Query2, #"Merged Queries" = Table.NestedJoin(Source,{"First Level Group", "Second Level Group"},Query1,{"First Level Group", "Second Level Group"},"Query1",JoinKind.LeftOuter), #"Added Custom" = Table.AddColumn(#"Merged Queries", "Custom value", each [Reference] * Table.RowCount([Query1]), Int64.Type), #"Removed Columns" = Table.RemoveColumns(#"Added Custom",{"Reference", "Query1"}) in #"Removed Columns"
Specializing in Power Query Formula Language (M)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-22-2017
10:36 PM
Regards
Zubair
Please try my custom visuals

Helpful resources
Recommendations
Subject | Author | Posted | |
---|---|---|---|
06-25-2024 03:02 PM | |||
09-23-2024 08:19 AM | |||
11-02-2023 01:41 AM | |||
09-27-2024 04:38 AM | |||
04-09-2024 07:53 AM |
Featured Topics
Top Kudoed Authors (Last Month)
User | Count |
---|---|
117 | |
99 | |
84 | |
53 | |
47 |