The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
Hi, I would like to get help with the following DAX:
I try to group number of customers by their deposit balance:
Customer groups = SUMMARIZE ( GROUPBY ( MonthsTrend, MonthsTrend[CUST.NO], "Total Balance", SUM (MonthsTrend[ LOC.BAL. ]) ), "Balance Group", SWITCH ( TRUE (), SUM (MonthsTrend[ LOC.BAL. ]) <= 1000, "0-1000", SUM (MonthsTrend[ LOC.BAL. ]) <= 10000, "1000-10000", "Over 10000" ), "Total Customers", COUNTROWS (VALUES (MonthsTrend[CUST.NO])) )
However, I receive the following error:
Function "Groupby" scalar expressions have to be aggregation functions over CurrentGroup()
What am I doing wrong?
Thanks in advance
Solved! Go to Solution.
hi @HarunK
try like:
hi @HarunK
try like:
Thank you very much FreemanZ!
User | Count |
---|---|
28 | |
12 | |
8 | |
7 | |
5 |
User | Count |
---|---|
36 | |
14 | |
12 | |
7 | |
7 |