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
snandy2011
Helper IV
Helper IV

Getting Problem on extracting a particular column's value by Dax

Hi Experts,

 

Please have a look on below scenario,

 

I have a Top ranking slicer (say value like,Top 5,TOp 10,TOP 15 etc).Based on this slicer i can simply calculate top customer 's deposit.(lets say, customer email,Total deposit). There are no issues with that.(Top customer rank has been calculated by customer email). Now i want to display customer phone number also along with customer email and total deposit.that means, when user select top 5 on the rank slicer then 5 records should be shown on each columns.

 

Example,

Lets my dataset is,

 

Customer Email     customer name  phone number    deposit Amount    city

abcd@fd.com        abcd                   123456                500                       AB

bcdf@fd.com         bcdf                    213546               800                       CD

efgh@fd.com         efgh                   32546                 400                        HG

ijk@fd.com             ijk                       56987                 1000                     KL

khjo@fd.com         khjo                    65426                  50                        LK

ghfo@fd.com        ghfo                    62548                  600                      FD

dsse@fd.com         dsse                   45598                   200                     AB

fdty@fd.com           fdty                   25568                   100                     FD

sdbg@fd.com         sdbg                   89974                  300                     KL

ewty@fd.com          ewty                   65925                  1200                  LK

ftyu@fd.com           ftyu                    78995                   150                     JK

dwqt@fd.com          dwqt                  54487                   650                    GY

 

Now i am calculating top customer based on customer email. Lets say, i have top 2,top 3,and top 5 value on my rank slicer.

 

So my expected result is,

 

suppose i have selected top 2 into my rank slicer,

 

Customer email         Deposit value    Phone number

ewty@fd.com             1200                  65925    

ijk@fd.com                  1000                    56987     

 

Agin when i will select top 3, then bcdf@fd.com will be added.

Customer email         Deposit value    Phone number

ewty@fd.com             1200                  65925    

ijk@fd.com                  1000                    56987     

bcdf@fd.com               800                         213546 

 

I am able to calculate customer rank based on their email, but failed to attched customer phone number.

Problem Faced :

1) When I am adding customer phone number, it is showing all the customer eamil and their deposit amount.the reason behind that,i have calculated rank based on customer email.beacuse email is  primary on my dataset and one customer can have multiple phone number.So, rank should be based on customr email

2) By one way, i have tried to achieve this problem, that, if deposit amount is blank then show blank otherwise show phone number, but getting error. here is the measure--  IF(ISBLANK([Top  value]),BLANK(),VALUES('Data Source'[Customer Phone])).

 

hope, i have explained everything.if anything else required please let me know.

 

 

Any idea to achieve this problem?

 

Any suggesation is really appreciable.

 

Thanks,

snandy

 

1 ACCEPTED SOLUTION
PattemManohar
Community Champion
Community Champion

@snandy2011 If you are looking to rank the data dynamically based on the Deposit Amount.... display based on the slicer selection (rank). Please try this... Add a new column as below:

 

RnkDeposit = RANK.EQ(CustomerRank[DepositAmt],CustomerRank[DepositAmt])

Then use this field as a slicer control then you can have data displayed as you like on whatever rank you want to see... 

image.png





Did I answer your question? Mark my post as a solution!

Proud to be a PBI Community Champion




View solution in original post

4 REPLIES 4
PattemManohar
Community Champion
Community Champion

@snandy2011 If you are looking to rank the data dynamically based on the Deposit Amount.... display based on the slicer selection (rank). Please try this... Add a new column as below:

 

RnkDeposit = RANK.EQ(CustomerRank[DepositAmt],CustomerRank[DepositAmt])

Then use this field as a slicer control then you can have data displayed as you like on whatever rank you want to see... 

image.png





Did I answer your question? Mark my post as a solution!

Proud to be a PBI Community Champion




@PattemManohar

 

Thanks for reply..

 

Sure i will try and let you know the feedback..

 

Thanks,

snandy

Hi @snandy2011,

 

Have you solved your problem?

 

If you have solved, please always accept the replies making sense as solution to your question so that people who may have the same question can get the solution directly.

 

If you still need help, please feel free to ask.

 

Best  Regards,

Cherry

Community Support Team _ Cherry Gao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi @v-piga-msft,

 

Sorry for delaying..I was out of connection. I had solved this problem by myself before getting response from others. I accepted my answer as solution also.But, unfortunately,it got deleted.Although, @PattemManohar's solution has also worked.So, i am accepting  his answer as my solution.

 

Thanks for reminding me..

 

Thanks,

snandy

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.