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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
TheFred
New Member

Filter not working when determining the status of records

Hi

 

I need some help with DAX formula and filtering.

 

I have a simple model: 1 lookup table and 1 fact table of renovation data.

 

Lookup table : ‘Buildings’ - building ID

 

Fact table: ‘Renovations’ – building ID, renovation ID, start date, end date

 

Each renovation has a renovation ID.

A renovation can have one or more sets of activities i.e. – multiple start and end dates.

A building can have one or more renovations.

 

I need to determine the current status of a renovation based on the report date i.e. - current, historical or planned.

 

The logic is:

  1. calculate the # rows in Renovation table
  2. determine the status of each record in Renovations table
  3. calculate the total # of current, historical or planned records in Renovations table
  4. calculate the # of current, historical or planned records for a specific Renovation ID
  5. determine whether a renovation is current, historical or planned for a given Renovation ID

 

Some of the formula seem to work OK but as soon as I filter my table with Building[building ID] the results are wrong. I have attached an example file with various tables.

 

Can someone explain what I am doing wrong?

 

Thanks

 

PS I have not attached the file yet as I'm trying to find the 'reply' option

2 REPLIES 2
v-cherch-msft
Microsoft Employee
Microsoft Employee

Hi @TheFred

 

It seems an issue with Excel. Please share your Power BI data sample file and expected output. You may refer to below post.You can upload it to OneDrive or Dropbox and post the link here. 

 

https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490

Regards,

Cherie

Community Support Team _ Cherie Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
TheFred
New Member

Here is the link to the file: Renovation example

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!

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

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