For example: I’d like the card to show something like “Product A has the highest revenue, while having 30% of profit margin and beeing ranked 2 on quantity sold” (in this case, “30%” and “2” should be dynamic values).
Hi @klein.keagan - I have implemented on sample EDNA file. All Data is dynamic on the card visual. Please replicate it on your data. Let me know in case of any queries.
Output = var a = maxx(SUMMARIZE(Products,Products[Product Name],"Rev",[Total Sales]),[Rev])
var b = SUMMARIZE(filter(Products,[Total Sales] = a),Products[Product Name])
var c = FORMAT(CALCULATE([Profit Margin],Products[Product Name] = b),"Percent")
var d = maxx(filter(SUMMARIZE(values(Products[Product Name]),Products[Product Name],"Rnk",[Rank Products]),Products[Product Name] = b),[Rnk])
return
b & " has the highest revenue of " & a & ", while having " & c & " of profit margin and beeing ranked " & d & " on quantity sold"
If you are talking about
var b = SUMMARIZE(filter(Products,[Total Sales] = a),Products[Product Name]). It is needed to get value of Product Name from Products table having highest revenue.
for Var D = it is to filter the rank for [Product Name] extracted in Var b.
Due to inactivity, we’d like to conclude that you no longer require assistance to solve your inquiry.
If you have a follow question or concern related to this topic, please remove the Solution tag first by clicking the three dots beside Reply and then untick the check box.