Forum Discussion
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
[email protected] abcd 123456 500 AB
[email protected] bcdf 213546 800 CD
[email protected] efgh 32546 400 HG
[email protected] ijk 56987 1000 KL
[email protected] khjo 65426 50 LK
[email protected] ghfo 62548 600 FD
[email protected] dsse 45598 200 AB
[email protected] fdty 25568 100 FD
[email protected] sdbg 89974 300 KL
[email protected] ewty 65925 1200 LK
[email protected] ftyu 78995 150 JK
[email protected] 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
[email protected] 1200 65925
[email protected] 1000 56987
Agin when i will select top 3, then [email protected] will be added.
Customer email Deposit value Phone number
[email protected] 1200 65925
[email protected] 1000 56987
[email protected] 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
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...
4 Replies
- PattemManoharCommunity 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...
- snandy2011Helper IV
- v-piga-msftResident Rockstar
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