Forum Discussion

Anmolgan's avatar
Anmolgan
Icon for Post Prodigy rankPost Prodigy
6 years ago
Solved

Customer 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"
)
)
  • 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,
    Kelly
    Did I answer your question? Mark my post as a solution!

     

9 Replies

  • az38's avatar
    az38
    Icon for Community Champion rankCommunity 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"
    )

     

    • Anmolgan's avatar
      Anmolgan
      Icon for Post Prodigy rankPost Prodigy

      az38  Hi this is working as required inside the measure, but the problem is this is not working when I take it inside the slider, how can I work this out using the slider option.

      • az38's avatar
        az38
        Icon for Community Champion rankCommunity Champion

        Anmolgan 

        its diffiult to answer wthout full data model 

        is ZSD_MAT_MARGIN[Volume] column or measure?