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
dpc_development
Helper III
Helper III

Including column from parent in Table visual messes up aggregation

Please see the attached excerpt: https://drive.google.com/file/d/1D24cyDv3Y9k2fY6EgtWAERFgWoA9uGxC/view?usp=sharing

 

I have a formula that calculates which of the rows in the table is the latest value, given the 'To' value in the Date Slicer. If you move the 'To' date to a date in Jan 2021 or prior, the value 1 will be in a different row.

 

The formula works, but when I try to pull in the column value from the parent (Units table), the Table Visual shows all the units, even though I have filtered for a single unit. Even setting bi-directional relationship does not help.

 

Can someone explain why this behaviour occurs and how I can pull in Unit Code into the Table Visual that you see.

 

Thanks for your time.

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Anonymous,

You can create a measure as below:

 

Latest event date = 
CALCULATE (
    MAX ( 'Unit Revision'[Event Date] ),
    FILTER (
        ALLSELECTED('Unit Revision'),
        'Unit Revision'[Unit Id] = SELECTEDVALUE ( 'Unit Revision'[Unit Id] )
            && 'Unit Revision'[Event Date] >= MIN ( 'Calendar'[Date] )
            && 'Unit Revision'[Event Date] <= MAX ( 'Calendar'[Date] )
    )
)

 

yingyinr_1-1621928946641.png

Best Regards

View solution in original post

5 REPLIES 5
dpc_development
Helper III
Helper III

Hi @Ashish_Mathur, thanks for your reply. I actually already know how to get the latest event date, it's using it to filter for the latest 'Unit Revision' row is where I am having problems. If you add 'Event Date' column to your Table visual or Gross Area, you'll notice four rows or the sum of all four rows, respectively. This is not the intended result. I need just the latest row.

Anonymous
Not applicable

Hi @Anonymous,

You can create a measure as below:

 

Latest event date = 
CALCULATE (
    MAX ( 'Unit Revision'[Event Date] ),
    FILTER (
        ALLSELECTED('Unit Revision'),
        'Unit Revision'[Unit Id] = SELECTEDVALUE ( 'Unit Revision'[Unit Id] )
            && 'Unit Revision'[Event Date] >= MIN ( 'Calendar'[Date] )
            && 'Unit Revision'[Event Date] <= MAX ( 'Calendar'[Date] )
    )
)

 

yingyinr_1-1621928946641.png

Best Regards

Hi,

Event Date should not be dragged to the visual.  It should be a measure.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
dpc_development
Helper III
Helper III

I feel this has something to do with relationships between the parent and child. Anyone has any clue?

Hi,

You may download my PBI file from here.

Hope this helps.

Untitled.png


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

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.

Top Solution Authors
Top Kudoed Authors