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 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
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 |
---|---|
107 | |
98 | |
83 | |
76 | |
65 |
User | Count |
---|---|
120 | |
112 | |
94 | |
84 | |
75 |