Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
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
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 41 | |
| 38 | |
| 36 | |
| 30 | |
| 28 |
| User | Count |
|---|---|
| 128 | |
| 88 | |
| 79 | |
| 67 | |
| 62 |