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.
Hello,
Please help me with a measure to auto populate the Title.
Requirement is, i have a output result which is from existing Measure. It is as below.
I need to get the Title which has Maximum Cost Per Travel from the existing Measure , and the title should be Title = "Maximum Cost per Travel by Customer CD".
Cost Per Travel | |
Customer AB | $100 |
Customer BC | $200 |
Customer CD | $500 |
Customer DE | $50 |
Solved! Go to Solution.
Hi,
This measure should work
Measure = "Maximum cost per travel by " & CONCATENATEX(TOPN(1,Customers,[Cost per travel]),Customers[Customer Name],", ")
I have assumed the following
Hope this helps.
Hi,
This measure works
Measure = "Least cost per order Customer is "&" "&CONCATENATEX(TOPN(1,VALUES(Data[Customer]),[CPO],ASC),Data[Customer])
Hope this helps.
Hi,
Does this measure work?
measure= "Least cost per order Customer is " & CONCATENATEX(TOPN(1,FILTER(VALUES(Data[Customer]),[CPO]>0),[CPO],ASC),Data[Customer])
Hi,
This measure should work
Measure = "Maximum cost per travel by " & CONCATENATEX(TOPN(1,Customers,[Cost per travel]),Customers[Customer Name],", ")
I have assumed the following
Hope this helps.
Hi Ashish,
Many thanks, this is working.
Similarly do we have a dax which can also show me
1) Min value from an existing measure
2) Meadian value from an existing measure.
Your guidance will be highly appriciable.
Regards
Prsahnth
You are welcome. If my previous reply helped, please mark that reply as Answer.
The Cost of travel measure should be modified. Use the MIN and MEDIAN functions instead of SUM.
Hi Ashish,
From the solution you provided which helped me to identify the Top drivers
CONCATENATEX(TOPN(1,Customers,[Cost per travel]),Customers[Customer Name],", ")
Similar to about (TOPN) function, do we also have any function to identify bottom drivers and median drivers?
Hi,
One of the inputs of the TOPN function is the sort order. Give that as ascending.
Hi Ashish,
I gave ASC order command but getting below error
Read about the TOPN function here - TOPN function (DAX) - DAX | Microsoft Learn. The fourth argument is important.
Hi Ashish,
I an still not able to figure out a solution for this dax. Please can you help me with an example?
Regards
Prashanth
Hi,
Share some data (in a format that can be pasted in an MS Excel file) and show the expected result.
Hi Ashish,
Here is some raw data.
With the belowformula i am able to arrive the top first customer
"Best-In-Class for Cost Per Order is "&" "&CONCATENATEX(TOPN(1,'Master file xlsx',[Cost Per Order]),'Master file xlsx'[Customer])
Similary the requirement is to pick the customer who is at least of cost per order (Customer-1 in the below example. Please advice
Customer | Cost Per Order |
Customer-1 | $45 |
Customer-2 | $55 |
Customer-3 | $65 |
Customer-4 | $75 |
Customer-5 | $85 |
Customer-6 | $95 |
Customer-7 | $145 |
Customer-8 | $545 |
Customer-9 | $845 |
Hi,
This measure works
Measure = "Least cost per order Customer is "&" "&CONCATENATEX(TOPN(1,VALUES(Data[Customer]),[CPO],ASC),Data[Customer])
Hope this helps.
Hello Ashish
The below measure is working well for me, but i am seeing another challange now.
The column [CPO] has few customers who's data is blank.
Hence the Measure is pulling all the customers name who's data is blank.
I tried IFBLANK function and its not working for me. Below is the measure i tried.
Measure = IF(ISBLANK(CPO),BLANK(),"Least cost per order Customer is "&" "&CONCATENATEX(TOPN(1,VALUES(Data[Customer]),[CPO],ASC),Data[Customer])
Please guide
Measure = "Least cost per order Customer is "&" "&CONCATENATEX(TOPN(1,VALUES(Data[Customer]),[CPO],ASC),Data[Customer])
Hi,
Share the download link of the PBI file and show the problem and expected result clearly.
Hi Ashish
Sorry, i will not be able to share the PBI file due to security concerns.
Here is the issue, below table has 3 customers whos CPO data is blank.
Customer | CPO |
Customer-1 | $45 |
Customer-2 | $55 |
Customer-3 | $65 |
Customer-4 | $75 |
Customer-5 | $85 |
Customer-6 | $95 |
Customer-7 | $145 |
Customer-8 | $545 |
Customer-9 | $845 |
Customer-10 | |
Customer-11 | |
Customer-12 |
Earlier you suggested the measure below which we used tp identify the customer who has the least Cost per order. But since we have the blank customer with no data (Blank cells), the measure we used is actully showing all the customers who has blank data instead of actual customer who has least cost per order.
the measure se used (measure: "Least cost per order Customer is "&" "CONCATENATEX(TOPN(1,VALUES(Data[Customer]),[CPO],ASC),Data[Customer])
As a solution i tried using IF(ISBLANK) funtion but it did not work.
IF(ISBLANK(CPO),BLANK(),"Least cost per order Customer is "&" "&CONCATENATEX(TOPN(1,VALUES(Data[Customer]),[CPO],ASC),Data[Customer])
Please advice
Regards
Prashanth
Hi,
Does this measure work?
measure= "Least cost per order Customer is " & CONCATENATEX(TOPN(1,FILTER(VALUES(Data[Customer]),[CPO]>0),[CPO],ASC),Data[Customer])
Hello Ashish,
Thank you so much and you are been genius all this while and helpful.
So kind of you 🙂
This measure worked too 🙂
Regards
Prashanth
You are welcome.
This helped, thanks a lot Ashish 🙂
You are welcome.
Hi @shantupm5
If I understand you correctly and you need to return the title for the customer with maximum cost, then:
1. Create a measure finding this customer:
2. Create measure with text for your title:
3 . Use your title measure wherever you need
If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
97 | |
97 | |
82 | |
74 | |
66 |
User | Count |
---|---|
121 | |
105 | |
102 | |
82 | |
72 |