Forum Discussion
HarunK
3 years agoRegular Visitor
DAX error
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], "T...
- 3 years ago
hi HarunK
try like:
Customer groups =SUMMARIZE (GROUPBY (MonthsTrend,"Total Balance",SUMX(CURRENTGROUP(), MonthsTrend[ LOC.BAL. ])),"Balance Group",CALCULATE(SWITCH (TRUE (),SUM (MonthsTrend[ LOC.BAL. ]) <= 1000, "0-1000",SUM(MonthsTrend[LOC.BAL.]) <= 10000,"1000-10000","Over 10000")),"Total Customers",)
FreemanZ
Super User
3 years agohi HarunK
try like:
Customer groups =
SUMMARIZE (
GROUPBY (
MonthsTrend,
"Total Balance",
SUMX(CURRENTGROUP(), MonthsTrend[ LOC.BAL. ])
),
"Balance Group",
CALCULATE(SWITCH (
TRUE (),
SUM (MonthsTrend[ LOC.BAL. ]) <= 1000, "0-1000",
SUM(MonthsTrend[LOC.BAL.]) <= 10000,
"1000-10000",
"Over 10000"
)),
"Total Customers",
)
- HarunK3 years agoRegular Visitor
Thank you very much FreemanZ!