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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
priya_rajendran
Frequent Visitor

Is it possible to get the Max value in the grand total alone

Hi, 

Is it possible to get the Max value / the latest value of the measure in the grand total alone ?

My measure:

Opening_HC =
var start_ = STARTOFMONTH(calendar_dim[cal_dt])
var end_ = ENDOFMONTH(calendar_dim[cal_dt])
var thisday = TODAY()

var opening = CALCULATE(distinctCOUNT('active+attrition'[Associate ID]),ALLEXCEPT('active+attrition','CC Details'[Tech Org 1],'CC Details'[IDC CC]),'active+attrition'[Date of Joining]<start_,'active+attrition'[Last Working Date]>= start_)

RETURN
IF(and(start_ <= DATE(YEAR(TODAY()), MONTH(TODAY()), 1),[Closing_HC]>0),opening)
 

hc_snap4.PNG

 

 

 

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

Hi @priya_rajendran ,

 

Has your problem been solved? If it is solved, please mark a reply which is helpful to you.

 

If the problem is still not resolved, please try the measure.

 

Total = 
IF (
    ISFILTERED ( calendar_dim[Month] ),
    [Opening_HC],
    MAXX ( VALUES ( calendar_dim[Month] ), [Opening_HC] )
)

vkkfmsft_0-1657175914831.png

 

Best Regards,
Winniz


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

3 REPLIES 3
v-kkf-msft
Community Support
Community Support

Hi @priya_rajendran ,

 

Has your problem been solved? If it is solved, please mark a reply which is helpful to you.

 

If the problem is still not resolved, please try the measure.

 

Total = 
IF (
    ISFILTERED ( calendar_dim[Month] ),
    [Opening_HC],
    MAXX ( VALUES ( calendar_dim[Month] ), [Opening_HC] )
)

vkkfmsft_0-1657175914831.png

 

Best Regards,
Winniz


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

Thanks much! This worked 🙂

amitchandak
Super User
Super User

@priya_rajendran , try measure like one discussed in this blog

https://community.powerbi.com/t5/Community-Blog/HR-Analytics-Active-Employee-Hire-and-Termination-tr...

 

 

you use isinscope to a have different formula with lastnonblankvalue

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.