Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Hi,
I've two measures Sales and Profit, but I want to create a dynamic parameter for sales and profit, how can I do it?
Regards,
Akhilesh Gupta
Solved! Go to Solution.
Measure =
var selecteditem = MAX(Slicer[Slicer])
return if(selecteditem="Sales",MAX(Sales[Sales]),MAX(Sales[Sales])-MAX(Sales[Cost]))
change MAX to SUM
Measure =
var selecteditem = MAX(Slicer[Slicer])
return if(selecteditem="Sales",SUM(Sales[Sales]),SUM(Sales[Sales])-SUM(Sales[Cost]))
Regards,
Charlie Liao
I have tested it on my local environemnt, the steps below are for you reference.
Regards,
Chalrie Liao
Hello Chalrie Liao,
I used the logic several times, which I got from you, but not working and showing the below error in screenshot.....
Please suggest and how can do it.
Regards,
Akhilesh Gupta
Hello Charlie Liao,
Thanks for the quick response.
The grand total is not matching for Profit and Sales, which I got the solution from you.
Regards,
Akhilesh Gupta
Measure =
var selecteditem = MAX(Slicer[Slicer])
return if(selecteditem="Sales",MAX(Sales[Sales]),MAX(Sales[Sales])-MAX(Sales[Cost]))
change MAX to SUM
Measure =
var selecteditem = MAX(Slicer[Slicer])
return if(selecteditem="Sales",SUM(Sales[Sales]),SUM(Sales[Sales])-SUM(Sales[Cost]))
Regards,
Charlie Liao
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.