Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
HeartFoundation
New Member

Calculate with previous Rank

Hi! I have not been able to find a solution to this (or maybe I didn't understand the solutions correctly), so please help me 🙂

 

I have a table with all client subscription transactions and a column to calculate the payment month since first payment (Betalingsmnd), based on the Date-column (BogDato).

 

PowerBi1.PNG

 

And a matrix which shows the sales (Beloeb) of all acquisition months (x) and the following months of sales standardized for easy comparison by the rank in Betalingsmnd (y).

 

PowerBi2.PNG

 

I would like to calculcate the percentage sales change since last month, which current rank (e.g. 4) means compared to the last rank (e.g. 3), and for each row of acquisition months. But I simply cannot get it to work. I have tried using measures such as this:

CALCULATE ( SUM ( Beloeb ) , FILTER ( Transactions [Betalingsmnd] ; Betalingsmnd - 1 ) )

And MAX, Previousmonth, DATEADD etc.

 

Thank you very much 🙂

 

 
1 ACCEPTED SOLUTION
v-kelly-msft
Community Support
Community Support

Hi @HeartFoundation

 

Try modifying your measure as below:

 

Measure =CALCULATE ( SUM ( Beloeb ) , FILTER ( ALL('Transactions'); [Betalingsmnd]=MAX([Betalingsmnd]) - 1 ) )

 

See an example as below:

Annotation 2020-05-01 105621.png

Best Regards,
Kelly
Did I answer your question? Mark my post as a solution!

View solution in original post

1 REPLY 1
v-kelly-msft
Community Support
Community Support

Hi @HeartFoundation

 

Try modifying your measure as below:

 

Measure =CALCULATE ( SUM ( Beloeb ) , FILTER ( ALL('Transactions'); [Betalingsmnd]=MAX([Betalingsmnd]) - 1 ) )

 

See an example as below:

Annotation 2020-05-01 105621.png

Best Regards,
Kelly
Did I answer your question? Mark my post as a solution!

Helpful resources

Announcements
PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.