Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

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.

Reply
Anmolgan
Post Prodigy
Post Prodigy

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"
)
)
1 ACCEPTED SOLUTION

Hi @Anmolgan

 

1.Create a slicer table with all the categories in the column:

Annotation 2020-04-09 174419.png

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.

Annotation 2020-04-09 174809.png

 

For the related .pbix file,pls click here.

 

 

Best Regards,
Kelly
Did I answer your question? Mark my post as a solution!

 

View solution in original post

9 REPLIES 9
az38
Community Champion
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"
)

 


do not hesitate to give a kudo to useful posts and mark solutions as solution
LinkedIn

@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
Community Champion
Community Champion

@Anmolgan 

its diffiult to answer wthout full data model 

is ZSD_MAT_MARGIN[Volume] column or measure?


do not hesitate to give a kudo to useful posts and mark solutions as solution
LinkedIn

That is a custom column that I have calculated, but how can I use the overall built measure inside the powerbi?

az38
Community Champion
Community Champion

@Anmolgan 

🙂

your new column should aggregated data from your custom column?

show, please, example both of your data and desired result?


do not hesitate to give a kudo to useful posts and mark solutions as solution
LinkedIn

@az38  here is the link: https://ifitech-my.sharepoint.com/:u:/g/personal/anmol_ganju_ifi_tech/EUjEXdktSClOrR_MzMAj3rABuCCRWR...

 

 

Check the ZSD MAT MARGIN table, measure created is Customer Classification 1 , desired output is been built in the page called "Segment/Sub-Segment Volume/Customer Population" check the table visual there, I just need to add that Customer Classification measure in my slider so thaat I can use the slabs to filter out 0-20 KL etc.

Hi  @Anmolgan ,

 

Just put the calculated column "Customer Population" in the slicer,and you will see:

 

Annotation 2020-04-08 123453.png

 

I have modified your .pbix file,pls click here.

 

Best Regards,
Kelly
Did I answer your question? Mark my post as a solution!

@v-kelly-msft Hi, customer population is a custom column and that is not aligning correctly with the measure that I had built, you can see it for yourself, 0-20 KL slab is not aligning correctly with the custom column filter

Hi @Anmolgan

 

1.Create a slicer table with all the categories in the column:

Annotation 2020-04-09 174419.png

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.

Annotation 2020-04-09 174809.png

 

For the related .pbix file,pls click here.

 

 

Best Regards,
Kelly
Did I answer your question? Mark my post as a solution!

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.