Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more.
Get startedGrow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.
Hello,
I have a measure like
Solved! Go to Solution.
Okay i got it by
Hi @Pbiuserr ,
Create a variable to calculate the category
var _top_category = <your code>
when you return the value you can use the concatenate function to display both values together
RETURN
Concatenate(_top_value, _top_category)
Can you help me with that measure? I think thats the part I struggle with
It's hard to create a measure without sample data, but you can use the logic below :
var _top_category =
CALCULATE(values(Fct_Table[Category]),
FILTER(Fct_Table, Fct_Table[<col_name>] = _top_value)
)
Basically filter out your table where your column value is equal to the max value and return the corresponding category
I tried similarly but got an error of :
MdxScript(Model) (312, 34) Calculation error in measure 'Calculations'[Top Qty Category ]: DAX comparison operations do not support comparing values of type Text with values of type Number. Consider using the VALUE or FORMAT function to convert one of the values.
Basically I want to return max value along with coresponding name of column Fct_Table[Category] of a measure. Can be any, like SalesAmount
Okay i got it by
User | Count |
---|---|
83 | |
78 | |
62 | |
61 | |
49 |
User | Count |
---|---|
109 | |
95 | |
86 | |
79 | |
61 |