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

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.

Reply
Roshan_201295
Frequent Visitor

I want to get last column value of matrix table in power Bi card ?

Capture.PNG

This above type Matrix table that I have in power Bi and it is showing that month start from April and end to the March.

In that I have slicer is going to change the matrix table accordingly month they have contain.

I want to get the last column summed value here in our case is March but sometime it can anything like Dec,Jan or feb anything.

So my issue is that I want Dax function which help me to get that value so that I can use in power Bi card.

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

Hi  @Roshan_201295 ,

Generally speaking, the order of Month in the matrix is sorted in alphabetical order. We can find the rank of Month by finding the largest rank.

Here are the steps you can follow:

1. Create measure.

rank =
RANKX(FILTER(ALL('Table'),'Table'[Category]=MAX('Table'[Category])),CALCULATE(MAX([Month])),,ASC)
Last =
CALCULATE(SUM('Table'[Amount]),FILTER(ALL('Table'),'Table'[Category]=MAX('Table'[Category])&&'Table'[rank]=MAXX(FILTER(ALL('Table'),'Table'[Category]=MAX('Table'[Category])),[rank])))

2. Result:

vyangliumsft_0-1651128768973.png

 

Best Regards,

Liu Yang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

View solution in original post

2 REPLIES 2
v-yangliu-msft
Community Support
Community Support

Hi  @Roshan_201295 ,

Generally speaking, the order of Month in the matrix is sorted in alphabetical order. We can find the rank of Month by finding the largest rank.

Here are the steps you can follow:

1. Create measure.

rank =
RANKX(FILTER(ALL('Table'),'Table'[Category]=MAX('Table'[Category])),CALCULATE(MAX([Month])),,ASC)
Last =
CALCULATE(SUM('Table'[Amount]),FILTER(ALL('Table'),'Table'[Category]=MAX('Table'[Category])&&'Table'[rank]=MAXX(FILTER(ALL('Table'),'Table'[Category]=MAX('Table'[Category])),[rank])))

2. Result:

vyangliumsft_0-1651128768973.png

 

Best Regards,

Liu Yang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

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.