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.
Hello !
I have a table with :
column 1 : product ID
colums 2 : the sales for each product
column 3 : the rank of each product (based on the column 2, so "1" is the most sold). This column is created with RANKX, it is a measure)
column 4 : an other measure (number)
I would like to calculate in a card the sum of the 150 first rows (value of column 3 between 1 and 150) of the column 4.
Is that possible ? How wounld you do that ?
Thanks for your help !
Hi, @Anonymous ;
You could try it .(here is a simple file that i calculate top 10.)
Measure = SUMX(FILTER(ALL('Table'),[RANK]<=10),[4col])
The final output is shown below:
Best Regards,
Community Support Team_ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Anonymous
Try this measure:
Measure =
VAR _A =
ADDCOLUMNS (
FILTER ( ALL ( 'Table' ), 'Table'[Column3] <= 4 ),
"C4", [column 4]
)
RETURN
SUMX ( _A, [C4] )
If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
LinkedIn: www.linkedin.com/in/vahid-dm/
@Anonymous provide a sample pbix
Hi @amitchandak thank but it does not work 🙂
Actually my column 4 is a measure which is already created using a SUM function.
But thanks for your help anyway.
@Anonymous , If column three is column not measure
then
calculate(sum(Table[Column 4]), filter(Table, Table[Column3] >=1 && Table[Column3] <=150 ) )
you can avoid sum if column 4 is a measure
a measure if you need
calculate(sum(Table[Column4]),TOPN(150,allselected(table[Column1]),calculate(sum(Table[Column4])) DESC), values(table[Column1]))
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
23 | |
10 | |
10 | |
9 | |
7 |