Forum Discussion
Anonymous
7 years agoNot applicable
Power BI Group Total
I have mock dataset looks like below. On my visualization, I have two problems: 1) I am trying to show the total sales by group. - called "group total". But on my dataset, I have Item ...
- 7 years ago
Anonymous - How about these:
return = VAR __group = MAX('Table17'[Group]) RETURN CALCULATE(SUM(Table17[Total Sales]),Filter(ALLEXCEPT(Table17,Table17[Date]),[Item code]="/return" && [Group]=__group))group total = CALCULATE(SUMX(FILTER(Table17,[Item code]<>"/return"),[Total Sales]),ALLEXCEPT(Table17,Table17[Group],Table17[Date]))
Very minor tweaks.
Attached again, Page 5, Table 17.
Greg_Deckler
7 years agoCommunity Champion
Anonymous - How about these:
return =
VAR __group = MAX('Table17'[Group])
RETURN
CALCULATE(SUM(Table17[Total Sales]),Filter(ALLEXCEPT(Table17,Table17[Date]),[Item code]="/return" && [Group]=__group))
group total = CALCULATE(SUMX(FILTER(Table17,[Item code]<>"/return"),[Total Sales]),ALLEXCEPT(Table17,Table17[Group],Table17[Date]))
Very minor tweaks.
Attached again, Page 5, Table 17.
Anonymous
7 years agoNot applicable
Greg_Deckler Thank you so much!! This works perfectly! I appreciate your help!!