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,
The measure down below shows how to get category name with maximum value
Solved! Go to Solution.
@Pbiuserr TRy this Measure
MINX ( SUMMARIZE ( Table, Table[GroupBy] , "Measure1",[YourMeasure] ), [Measure1])
Else refer this accepted solution:
1. Create a measure for getting max of the change:
MaxChange = CALCULATE(MAX(Fct_Table[Change]), ALL(Fact_Table))
2. Create another measure to get the category with max change:
MaxCategory = CALCULATE(MAX(Fct_Table[Category]), FILTER(Fact_Table, Fct_Table[Change] = [MaxChange]))
Same goes with finding minimum category, create another set of measures and replace MAX with MIN
Yes but the table in this scenario must consist Fct_Table[Gender] and Fct_Table[Category] and its need to be sorted by [Change] measure. Can you help me build such measure?
Edit: Change is not a Fct_Table[Change], its a measure
Hello @Pbiuserr ,
Could you please share sample data in text format along with expected output if possible?
Kind regards,
Rohit
Hey,
Sory, data is confidential unfortunately
Expected result is:
You have a table like (I've made it inside the measure)
Gender | Category | Change |
Male | Category2 | 10% |
Female | Category1 | 2% |
Female | Category5 | 3% |
Male | Category3 | 7% |
from that I want retrive name of Category1 as its MIN [Change] (2%). The measure I've put will retrived Category2 as its MAX [Change] (10%). I can make it for MAX but can't for MIN and seek some help
Hi @Pbiuserr ,
Please try creating the following measures :
Kind regards,
Rohit
Please mark this answer as the solution if it resolves your issue.
Appreciate your kudos! 😊
Hello,
[Change] Is a measure, not a column and MIN needs a column reference. How to overcome it?
I have two columns:
Fct_Table [Category]
Fct_Table [Gender]
and one measure
[Change]
Hello @Pbiuserr ,
In that case you will have to use the MAXX and MINX functions to calculate max and min values of change.
I have assumed that you have a single measure named "__Change" that computes the change.
Kind regards,
Rohit
Please mark this answer as the solution if it resolves your issue.
Appreciate your kudos! 😊
Hello,
There is Gender[Change], which in fact I can't put as a column, because its measure 😔
when I put [Change] instead of Gender[Change] I got an error that "table of multiple values was supplied". I think due to VALUES(FctTable[Category]) ?
@Pbiuserr TRy this Measure
MINX ( SUMMARIZE ( Table, Table[GroupBy] , "Measure1",[YourMeasure] ), [Measure1])
Else refer this accepted solution:
Hey,
What you've wrote gives me MIN value of [Change]. What I'd like to get it name of category associated with that minimum value. That's the part I can't get
so for my table is Category 1 as it has MIN value of [Change] - 2%
@Pbiuserr Try this measure:
I have an error that MIN function accepts only column references in the Argument1
Could it be potentially because [Change] is measure, not a calculated column?
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 |
---|---|
110 | |
100 | |
80 | |
64 | |
58 |
User | Count |
---|---|
148 | |
111 | |
94 | |
84 | |
67 |