Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
Hi all,
I am trying to create a measure I want to use with smart narratives:
There are a lot of customers (Customers [Customer]) they all have revenue (Sales[revenue])
I created the following measures:
Revenue actual year = sum(sales[revenue])
Revenue sum = calculate(sum(sales[revenue]))
Revenue last year = calculate([Revenue sum], dateadd(date[date],-1,YEAR))
Delta Revenue = [Revenue actual year] - [Revenue last year]
What I need is a measure that gives me the amount of the 10 customers with the biggest Delta Revenue.
I created RankDelta = rankx(ALLSELECTED(Customers[Customer]),[Delta Revenue],,DESC,Dense)
--> this works fine, if I drag Customer, Delta Revenue and RankDelta in a Table, it looks like this:
Customer | Delta Revenue | RankDelta |
A | 5000 | 1 |
B | 4000 | 2 |
C | 1000 | 3 |
D | 500 | 4 |
... | ... | ... |
Then I hoped to finally create this measure:
TopDelta = calculate([Delta Revenue],filter(Measures,[RankDelta]<11))
But all I am getting is the entire sum of the delta of all customers. The filter is not doing a thing.
Got any ideas? I ran out of those. Thanks!
Solved! Go to Solution.
Hi, @herbemischung
It’s my pleasure to answer for you.
According to your description,I think you can modify your measure.
Like this:
TopDelta =
CALCULATE (
[Delta Revenue],
FILTER ( ALLSELECTED ( Customer ), [RankDelta] < 11 )
)
If it doesn’t solve your problem, please feel free to ask me.
Best Regards
Janey Guo
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @herbemischung ,
Here's a Calculated Measure DAX that will help you in your scenario:
Top 10 Delta Summation = CALCULATE(SUM('Customer'[Delta Revenue]),'Customer'[RankDelta] <= 10)
Give a thumbs up if this post helped you in any way and mark this post as solution if it solved your query !!!
Hi, @herbemischung
It’s my pleasure to answer for you.
According to your description,I think you can modify your measure.
Like this:
TopDelta =
CALCULATE (
[Delta Revenue],
FILTER ( ALLSELECTED ( Customer ), [RankDelta] < 11 )
)
If it doesn’t solve your problem, please feel free to ask me.
Best Regards
Janey Guo
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
User | Count |
---|---|
131 | |
108 | |
101 | |
67 | |
64 |
User | Count |
---|---|
137 | |
115 | |
102 | |
71 | |
61 |