Forum Discussion
power query/ dax measure , multiple conditions/ multiple answers
- Nov 17, 2025
You may use measure like
Shared := VAR TotalRevenue = SUMMARIZE ( Revenue, Revenue[category], "Revenue", SUM ( Revenue[revenue] ) ) VAR AddShares = ADDCOLUMNS ( CROSSJOIN ( TotalRevenue, Shares ), "ToTake", Revenue[category] = Shares[employee] ) VAR Filtered = FILTER ( AddShares, [ToTake] ) VAR KeepColumns = SELECTCOLUMNS ( Filtered, "Employee", [employee], "Manager", [accountmanager], "Revenue", [revenue], "Share, %", [share accountmanager] ) VAR Result = ADDCOLUMNS ( KeepColumns, "Shared", [Revenue] * [Share, %] ) RETURN SUMX ( Result, [Shared] )For Power Query only no changes are required
Your measure is really working fine! Thanks SergeiBaklan!
If in revenue table also column with years is added: do also have measure to get variance in revenue in year X (selected with slicer) compared to year X-1?
Niels_83 , do you work only with years, or consider periods as months, quarters, YTD, etc.?
And it's not clear how to show result, perhaps you may expand your Answer sample with periods variances.
Also, perhaps "share accountmanagers" differ from period to period.
- Niels_83Nov 20, 2025Tin Contributor
I have separate column for year (number) and month (text). It would be great if you have measure for variance in revenue in selected year (selected with slicer) compared to year-1. And maybe even year to month (cumulative). Something like (from pivot tabel):
- SergeiBaklanNov 21, 2025Diamond Contributor
Sorry, I didn't catch. Desired result doesn't look as PivotTable. For it we may have periods as columns, category as rows and one or two measures as aggregation for their intersection.