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.
I have a parameter I am trying to create in order to determine the revenue associated with a dynamic number of customers. This formula gives me all of the revenue rather than limiting it to the number of customers selected by the parameter. How would I fix this?
Top N =
Calculate(sum([Rev]),
TopN(Parameter Value, VALUES([Customer Rank]), sum([Rev]), ASC)
)
Hi @czuniga ,
We can create a measure as below to work on it.
Measure =
VAR a =
ADDCOLUMNS (
'Table',
"rank", RANKX ( ALL ( 'Table' ), 'Table'[value],, DESC, DENSE )
)
RETURN
SUMX ( FILTER ( a, [rank] <= Parameter[Parameter Value] ), 'Table'[value] )
Pbix as attached.
Hi @czuniga ,
use the what-if parameter, see figure. It creates a new table with a measure. Insert this measure in your TopN measure.
Regards FrankAT
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 |
---|---|
114 | |
100 | |
75 | |
73 | |
49 |
User | Count |
---|---|
145 | |
109 | |
109 | |
90 | |
64 |