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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
RyanLeeMc
Frequent Visitor

Table Values Incorrect When I Add a Measure

Hello, 

 

I'm having an issue with a table visual....it contains a single account number from an accounts table and then info of all the bookings linked to that account number from a booking table (see below)

RyanLeeMc_0-1647275403876.png

 

For some reason when I add in a measure to this table, all the other records from the bookings table now appear with empty values, even though they are not linked to the account number (see below)

RyanLeeMc_1-1647275632418.png

 

Please help 🙂

7 REPLIES 7
Anonymous
Not applicable

Hi @RyanLeeMc,

It seems like the newly added measure expands the records and breaks the row context that the previous formulas required so they do not show the corresponding calculation results. You can try to add a filter to check if the current formula results are not equal to zero to skip the calculation on the wrong ranges.

ISFILTERED function (DAX) - DAX | Microsoft Docs

In addition, can you please share the Dax expression and some dummy data that keep the raw data structure? It should help us clarify your scenario and test to coding formula.

How to Get Your Question Answered Quickly  

Regards,

Xiaoxin Sheng

darshaningale
Resolver II
Resolver II

there should me one-many cardinality from the accounts to bookings table.

Nahid_3152
Helper I
Helper I

HI @RyanLeeMc ,
Hope u r doing well.

What kind of cardinality ur using? what is ur measure syntax? If ur cardinality many to many then u may face some problems. 
For using Column 
Day_eclipse= DATEDIFF (1st date,2nd Date,DAY)



Hi, 

The relationship between the bookings table and accounts table is many to one, no dupes in accounts table. 

This is the measure I am adding to the table that seems to mess with all the values:

Days Elapsed = DATEDIFF(FIRSTDATE(bookings[start_date]),LASTDATE('date table'[Date]),DAY)
 
I'm doing it this way so I can find the days between the start date and the current date selected (on a slicer)
 
Thanks

The DaysElapsed measure should be 

Days Elapsed = DATEDIFF(FIRSTDATE(bookings[start_date]),SELECTEDVALUE('date table'[Date]),DAY)

Hi, 

I tried your solution but it returns no values for the measure, I have the slicer as follows:

RyanLeeMc_0-1647336932795.png

I need to use LASTDATE so that it picks up the last date selected in the date range (31/01/2019).

 

I've had another play around and it I have removed the account_id from the table and instead used the account_id from the bookings tables and it seems to work fine, so must be something to do with the relationships? 

Hi @RyanLeeMc If you can provide a pbix file with sample data then probably can help.

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.