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
JD09
Advocate I
Advocate I

Overall Total Mismatch in Table Visual

Hello,
Need help in solving the below problem definition:

A Power BI Measure needs to Fetch The Latest Product Quantity for the Selected Date & Product (Currently Measure Fetches the Latest Product Qty based On Date & Product Selection.)
Now the issue is when you Place this measure in the Table Visual, There is a Missmatch in Overall Total Quantity.

DAX Used for the Measure

 

Measure =
Var getminDate = MIN(Sheet1[Date])
Var getMaxDate = MAX(Sheet1[Date])
Return
IF(
    getminDate = getMaxDate,
    CALCULATE(
        SUM(Sheet1[Qunatity]),
        Sheet1[Date] = getminDate
    ),
    CALCULATE(
        SUM(Sheet1[Qunatity]),
        Sheet1[Date]=getMaxDate
    )
)


Please find the reference Screenshot.

JD09_0-1709892172237.png

 


Thank you in Advance!

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @JD09 

You can create  a new measure.

 

Total =
SUMX ( VALUES ( 'Table'[Product Name] ), [Measure] )

 

 the [product name] field need to make sure is the field that you put to the table visual.

 

Best Regards!

Yolo Zhu

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

 

 

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Hi @JD09 

You can create  a new measure.

 

Total =
SUMX ( VALUES ( 'Table'[Product Name] ), [Measure] )

 

 the [product name] field need to make sure is the field that you put to the table visual.

 

Best Regards!

Yolo Zhu

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

 

 

Nithinr
Resolver III
Resolver III

To solve this you need to create a non related calender table and use it as a slicer

calendar = CALENDAR(DATE(2024,1,1),DATE(2024,12,31))

 

just tweak the existing measure to use calendar date

 

Measure =
Var getminDate = MIN(calendar[Date])
Var getMaxDate = MAX(calendar[Date])
Return
IF(
    getminDate = getMaxDate,
    CALCULATE(
        SUM(Sheet1[Qunatity]),
        Sheet1[Date] = getminDate
    ),
    CALCULATE(
        SUM(Sheet1[Qunatity]),
        Sheet1[Date]=getMaxDate
    )
)

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.

Top Solution Authors
Top Kudoed Authors