Forum Discussion
Simple GroupBy Question
- 4 years ago
powerbienthuzi looks like you need a derivedTbl, Can you try this
derivedTbl= groupby(PnL_Data, PnL_Data[deID], PnL_Data[pstartdate], PnL_Data[pperiod],"sum", SUMX(CURRENTGROUP(),PnL_Data[AccruedCompensation]))SUMAMRIZE has more layers than it looks
https://www.sqlbi.com/articles/all-the-secrets-of-summarize/
OK. What are you currently getting and what are you trying to get your visual to look like?
You shouldn't need any fancy DAX to do basic aggregations. Just drag the column you want to group on and the column you want to sum into your visual. (You may need to tell it not to aggregate pperiod.)
I see. I have deleted my code for groupby and am trying to get it in a table format using Summary now
- AlexisOlson4 years agoSuper User
Does your PnL table have any filters you want that didn't get included when you summarized it?
- powerbienthuzi4 years agoFrequent Visitor
Hi Alexis - It has no filters that I needed.
- smpa014 years agoCommunity Champion
powerbienthuzi looks like you need a derivedTbl, Can you try this
derivedTbl= groupby(PnL_Data, PnL_Data[deID], PnL_Data[pstartdate], PnL_Data[pperiod],"sum", SUMX(CURRENTGROUP(),PnL_Data[AccruedCompensation]))SUMAMRIZE has more layers than it looks
https://www.sqlbi.com/articles/all-the-secrets-of-summarize/