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
thebigbamf
Frequent Visitor

Most Current cell value ignoring blanks

I am trying to make a dashboard from an excel document that gets pulled in from our internal sharepoint that my staff keep up to date.  My dashboard should show the current total of workstations on the network.  I have thrown in different numbers to make sure the dashboard is working correctly, but it is pulling the max value instead of the most recent value, excluding blanks.

 

Table View:

thebigbamf_0-1701114134447.png

 

I created a card under visualizations and the formula is:   

LatestTotalWorkstations = LASTNONBLANK(AD[Total Workstation Objects], 1)
 
This pulls the correct column (Total Workstation Objects) but defaults to the max value, 5000 in this case, of that column instead of the current total of 4800.  This forumula should always pull the most recent value.  How can I fix this? 
 
Thanks in advance!
1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@thebigbamf , Try a measure like, assuming [Total Workstation Objects] is a column

 

LatestTotalWorkstations = LASTNONBLANKValue(AD[Date], Sum(AD[Total Workstation Objects]) )

Power bi tutorial: DAX functions: lastnonblankvalue , firstnonblankvalue: https://www.youtube.com/watch?v=cN8AO3_vmlY&t=26940s

View solution in original post

4 REPLIES 4
v-zhangti
Community Support
Community Support

Hi, @thebigbamf 

 

You can try the following methods.

Measure = 
Var _maxdate=CALCULATE(MAX(AD[Date]),FILTER(ALL(AD),[Total Workstation Objects]<>BLANK()))
Return
CALCULATE(MAX(AD[Total Workstation Objects]),FILTER(ALL(AD),[Date]=_maxdate))

vzhangti_0-1701226458656.png

Is this the result you expect? Please see the attached document.

 

Best Regards,

Community Support Team _Charlotte

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

 

Ashish_Mathur
Super User
Super User

Hi,

Create a Calendar Table and write this measure

Latest Total Workstations = CALCULATE(SUM(AD[Total Workstation Objects]),LASTNONBLANK('Calendar'[Date],CALCULATE(SUM(AD[Total Workstation Objects]))))

 


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
amitchandak
Super User
Super User

@thebigbamf , Try a measure like, assuming [Total Workstation Objects] is a column

 

LatestTotalWorkstations = LASTNONBLANKValue(AD[Date], Sum(AD[Total Workstation Objects]) )

Power bi tutorial: DAX functions: lastnonblankvalue , firstnonblankvalue: https://www.youtube.com/watch?v=cN8AO3_vmlY&t=26940s

Thank you this worked perfectly!

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.

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.