Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
I have software usage data and depending of the software type we want to assign the TOPN users to discounted seats.... The number of discounted seats we have varies by software type... At the end I have a table that shows all of the pricing options and we want to select the cheapest route per user and come up with a total budget...
I am currently using TOPN to create a top number of users in software reports and the function works well if I enter a stactic value for the N_value, however if I try to use a function in the place the measure does not work even htough I have confirmed the right number is getting passed with the function... Is this a bug/ limitation?
if I replace the number 69 below with any other method of getting that number the measure stops working... I need N_value to be dynamic... what am I doing wrong here?
for example I want to replace 69 here with min(discounted seats)
My measure:
Solved! Go to Solution.
Hey @NW953, try this one and let me know if there is any problem.
Forecast PDM Discount Seat Cost =
var N_Value = MIN(Usage[Discounted Seats])
var PDM_Disc_Users =
TOPN(N_Value,ALLSELECTED(Usage[email]),
[PDM Usage],DESC)
RETURN
CALCULATE(sumx(
values(Usage[email]),
min(Usage[PDM Discount Seat Cost])),
filter(VALUES(Usage[email]),Usage[email] IN PDM_Disc_Users))
Try setting min(discounted seats) to a variable and then use it instead of 69.
I have tried that as well, no luck
I just don't get any results... version 2 uses the function, version 1 is hard coded
Hey @NW953, try this one and let me know if there is any problem.
Forecast PDM Discount Seat Cost =
var N_Value = MIN(Usage[Discounted Seats])
var PDM_Disc_Users =
TOPN(N_Value,ALLSELECTED(Usage[email]),
[PDM Usage],DESC)
RETURN
CALCULATE(sumx(
values(Usage[email]),
min(Usage[PDM Discount Seat Cost])),
filter(VALUES(Usage[email]),Usage[email] IN PDM_Disc_Users))
Check out the July 2025 Power BI update to learn about new features.
User | Count |
---|---|
23 | |
7 | |
7 | |
6 | |
6 |
User | Count |
---|---|
27 | |
12 | |
10 | |
9 | |
6 |