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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

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
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel

Power BI Monthly Update - May 2024

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