Forum Discussion
Anmolgan
Post Prodigy
6 years agoCustomer Population grouping not working?
I want to group the customers as per there sum of the volumes, I am trying to get the below measure to work I had both tried custom column and measure but the below measure is not working out to be, can anyone help me on this:
Customer Classification =
IF(ZSD_MAT_MARGIN[Volume] >= -1111111 && ZSD_MAT_MARGIN[Volume] <= 20.99,
"0-20 KL",
IF(ZSD_MAT_MARGIN[Volume] >= 21 && ZSD_MAT_MARGIN[Volume] <= 49.99,
"21-49 KL",
IF(ZSD_MAT_MARGIN[Volume] >= 50 && ZSD_MAT_MARGIN[Volume] <= 99.99,
"50-99 KL",
">100 KL"
)
)
Customer Classification =
IF(ZSD_MAT_MARGIN[Volume] >= -1111111 && ZSD_MAT_MARGIN[Volume] <= 20.99,
"0-20 KL",
IF(ZSD_MAT_MARGIN[Volume] >= 21 && ZSD_MAT_MARGIN[Volume] <= 49.99,
"21-49 KL",
IF(ZSD_MAT_MARGIN[Volume] >= 50 && ZSD_MAT_MARGIN[Volume] <= 99.99,
"50-99 KL",
">100 KL"
)
)
Hi Anmolgan,
1.Create a slicer table with all the categories in the column:
2.Create a measure as below:
check = IF(SELECTEDVALUE('Slicer table'[Column1])='ZSD_MAT_MARGIN'[Customer Classification 1],1,0)3.finally put the measure in the table visual and select measure =1.
For the related .pbix file,pls click here.
Best Regards,
KellyDid I answer your question? Mark my post as a solution!
9 Replies
- az38
Community Champion
Hi Anmolgan
try a simple column with SWITCH() statement
Customer Classification = SWITCH(TRUE(), ZSD_MAT_MARGIN[Volume] >= -1111111 && ZSD_MAT_MARGIN[Volume] <= 20.99, "0-20 KL", ZSD_MAT_MARGIN[Volume] >= 21 && ZSD_MAT_MARGIN[Volume] <= 49.99, "21-49 KL", ZSD_MAT_MARGIN[Volume] >= 50 && ZSD_MAT_MARGIN[Volume] <= 99.99, "50-99 KL", ">100 KL" )