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

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.

Reply
NunoTrigo1986
Helper I
Helper I

Measure to use in a SCD type 2

Taken the following sample of my database:

NunoTrigo1986_0-1679062276325.png

In tihs sample there is 3 different entries. Each entry is defined mainly by the adress. Here we track  rent announces. As we can see each announce can have different entries that are stampled by "date from" and "date to". Usually the difference between entries of same house is the price. Some housing rentals are inactive (not shown in the sample), and so under column "iscurrent" it is a 0 (incative) and not (1) active.

 

I need to have three measures that I am struggling quite hard to get:

 

-A measure that gives the average of last active announce per house?The measure should take into account active announces or the latest inactive account (the last one). ANother measure should just have in account inactive announces (iscurrent 0).

 

- usually when there is several entries for each announce, it is because home owner is changing the rental price. I would like to get an line graf with average og price changing between the first announce of an house and the last one. It can be aggregated ( it means all), or specified by city or indicidually ( the last filters is easy to do if i set a filter.

 

Thanks for your help. 

  

1 REPLY 1
lbendlin
Super User
Super User

Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).
https://community.powerbi.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-...
Please show the expected outcome based on the sample data you provided.

https://community.powerbi.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 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.