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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
Cpaterson
Frequent Visitor

Display value of the last selected month (even when there's multiple month selected)

Let's say I have a simple table with Months and value

Jan5
Feb7
Mar2

 

Is there a way to display the last value (without any calculation or sum) of the latest month selected (even when there's multiple month selected).

Ex.: 

You select Jan, it shows 5

You select Q1 (Jan+Feb+Mar) it shows 2

 

Thanks you.

1 ACCEPTED SOLUTION
Nathaniel_C
Super User
Super User

Hi @Cpaterson ,

PBIX Here is my pbix. I added an index column in Power Query.
Let me know if you have any questions.

If this solves your issues, please mark it as the solution, so that others can find it easily. Kudos are nice too.
Nathaniel
last.PNG

 

 

Last month selected value = 

var _mIndex =MAX(texx[Index])

var _calc = CALCULATE(MAX(texx[Column2]),texx[Index]=_mIndex)
return _calc ​

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




View solution in original post

4 REPLIES 4
Nathaniel_C
Super User
Super User

Hi @Cpaterson ,

PBIX Here is my pbix. I added an index column in Power Query.
Let me know if you have any questions.

If this solves your issues, please mark it as the solution, so that others can find it easily. Kudos are nice too.
Nathaniel
last.PNG

 

 

Last month selected value = 

var _mIndex =MAX(texx[Index])

var _calc = CALCULATE(MAX(texx[Column2]),texx[Index]=_mIndex)
return _calc ​

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Hi All, 

 

i thought i would post on a thread which is close to the solution i am looking for, but not quite. 

 

I have two months selected in a slicer which produce an interest rate correctly if i make a single selection.

 

Interest Rate =

CALCULATE(

CALCULATE(

SUMX('EOM Balance','EOM Balance'[AccountBalance] *

'EOM Balance'[InterestRate]) /

'EOM Balance'[Month End Balance]),

USERELATIONSHIP('EOM Balance'[SnapshotDate],'Date'[Date])) /

100

 

when i make a multiple selection, i would like the interest rate for the most recent month. 

 

i.e. March is 1.3 and April is 1.4

 

if i select March and April i would like for it to show April. 

 

but cant seem to get it to work. 

 

any help would be appreciated

Thanks @Nathaniel_C  !!! You are the best !!

Hi @Cpaterson ,

You are welcome! Thank you for the kind words.

Nathaniel





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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

Top Solution Authors