Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more.
Get startedGrow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.
Hello everybody!!
I need a help with a measure, i need to get a sum of measure SumTOP5, but it can't a column, its necessary to be a measure.
The expected results should be: SumTOP5 = 11.12, and not 1.68, that's been displayed, i dont know where am i missing.
My measures are:
*SumTOP5 = IF( and ( [Indexcol] >= 1, [Indexcol] <=5), [TOP5SEPARADO])
Any help id appreciated! thank you!
Hi @larcaris ,
There are two ways that you could try.
Sum of sales = SUM('Table'[Sales])
TOP5 =
SUMX (
TOPN (
5,
FILTER ( 'Table', 'Table'[Index] >= 1 && 'Table'[Index] <= 5 ),
'Table'[Category], ASC
),
[Sum of sales]
)
TopN =
CALCULATE (
[Sum of sales],
TOPN (
5,
FILTER ( 'Table', 'Table'[Index] >= 1 && 'Table'[Index] <= 5 ),
'Table'[Category], ASC
)
)
Best Regards,
Xue Ding
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@v-xuding-msft My problem is that the "Sales" is a measure too, that do the top5:
And I am not able to calculate the sum of this measure, to apply your solution ://
Hi @larcaris ,
You can use the function of SUMX, like this:
Measure = SUMX(Your_table,[TOP5])
If you get any error message, please post here.
Best Regards,
Xue Ding
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Refer
https://community.powerbi.com/t5/Desktop/Sum-of-TOPN-Columns/td-p/86892
Appreciate your Kudos. In case, this is the solution you are looking for, mark it as the Solution.
In case it does not help, please provide additional information and mark me with @
Thanks. My Recent Blogs -Decoding Direct Query - Time Intelligence, Winner Coloring on MAP, HR Analytics, Power BI Working with Non-Standard TimeAnd Comparing Data Across Date Ranges
Proud to be a Datanaut Connect on Linkedin
User | Count |
---|---|
80 | |
78 | |
70 | |
70 | |
54 |
User | Count |
---|---|
107 | |
99 | |
88 | |
79 | |
67 |