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

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now

Reply
Karolina_Sliwa
Frequent Visitor

Unable to get latest data on visual untill applying a filter

Hello, I would be grateful if you can help me or at least point out on what am I doing wrong: 

I have a data with customer requirements number and statuses however when I apply in filter that is should take data from latest avilable date it is showing properly: 

Karolina_Sliwa_0-1732006901828.pngKarolina_Sliwa_1-1732006916592.png



When I remove this filter it is showing me all the statuses one requirement had in the past so it is counting it more than one time: 

Karolina_Sliwa_2-1732006971260.png

 

 

I count the number with this measure: 

Customer Requirements =
CALCULATE(
    DISTINCTCOUNTNOBLANK('Customer Requirements 2'[Requirement Customer Id]),
    FILTER('Customer Requirements 2', 'Customer Requirements 2'[Date]= [Last Available Date]))

In Y axis I am providing this measure nad X-axis the status (Compliance form my available data in sheet).

Karolina_Sliwa_0-1732007321064.png

 



How to define this data to have them accroding the latest avilable date but not having to add this Date in the filters?


For my files I am adding new files each weekw with a date to have a history becuase I need to see a progress in time also (in other visuals).







4 REPLIES 4
shafiz_p
Super User
Super User

Hi @Karolina_Sliwa  As I can understand that you want to show requirements for latest date and also have the ability to use custom date.


It is better to provide representative data and desired output to get the exact solution.

However, If this is the case, you could try this:

Customer Requirements =

VAR _LatestOrSelected =
IF(
  ISFILTERED('Customer Requirements 2'[Date]),
  SELECTEDVALUE('Customer Requirements 2'[Date]),
  MAX('Customer Requirements 2'[Date])
)

RETURN
CALCULATE(
    DISTINCTCOUNTNOBLANK('Customer Requirements 2'[Requirement Customer Id]),
    FILTER(
         'Customer Requirements 2', 
         'Customer Requirements 2'[Date]= _LatestOrSelected
    )
)

 

 

Hope this helps!!

If this solved your problem, please accept it as a solution and a kudos!!

 

Best Regards,
Shahariar Hafiz

MFelix
Super User
Super User

Hi @Karolina_Sliwa ,

 

If you have information from other dates you always need to have the filter for the specific date you want, this can be done in two ways, you can add the filter context on the measure has you did, and use that measure for that specific visual, or add the filter to the visual itself in the filter pane to only get the latest date.

 

For that specific visual you will need to change the filter context for the measure in one of the two ways described.


Regards

Miguel Félix


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

Proud to be a Super User!

Check out my blog: Power BI em Português





Hi, thanks for an answer. 

I already have added filter on this measure Customer Requirements takingin to consideraiton latest available date, however if I am adding on the visual Compliance(status) of those requirements it is showing me more requirements than in the latest data - like it showing e.g. Completed, In-Porgress status for one requirements as in teh past the status was differtn, so it look like frot hose statuses I do not have filter context? Something like this.. 

Anonymous
Not applicable

Hi @Karolina_Sliwa 

Please provide sample data that fully covers your issue and the expected outcome based on the sample data you provided. So that I can help you better. Please remove any sensitive data in advance.



Best Regards,

Jayleny

 

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

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

February Power BI Update Carousel

Power BI Monthly Update - February 2026

Check out the February 2026 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.