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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

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
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.