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.
Hello -
I am trying to group people with the same period to show the summed value of compensation. So for instance, this employee example should show 14505 in period one. My current approach uses an if function but I know groupby would be the better route so any help would be appreciated.
Solved! Go to Solution.
@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/
What is the expected result? Are you trying to do this in the query editor or as a report visual or something else?
Hi Alexis - This would be a report visual andI rather have as it's own table since I want to add other columns to it.
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
Does your PnL table have any filters you want that didn't get included when you summarized it?
Hi Alexis - It has no filters that I needed.
@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/
That worked. Thank you!
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
110 | |
95 | |
76 | |
65 | |
51 |
User | Count |
---|---|
146 | |
109 | |
106 | |
88 | |
61 |