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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
Tech122
Frequent Visitor

Sum of Result of rows from another measure

Hi, Gurus. Hope you can help me . I have tried hours looking for a solution and tried multiple attempt but failed.
Hope somwone could help me here . I need to show the total, base on the selecttion of date , which is already defined on 01. New measure . Currently its showing the latest dates result set in Total. 

Many thanks in advance

 Capture.JPG

2 REPLIES 2
Tech122
Frequent Visitor

Hi Thanks for this, perhaps if I include the 01. New calculation it might be more understandable .

01.New =
VAR CurrentWeekEnd = MAX( 'Date Slicer'[Week End] )
VAR PreviousWeekEnd = CurrentWeekEnd - 7
VAR NewOpportunityID =
    ADDCOLUMNS(
        ALLSELECTED( 'Snap Week Validation'[Opportunity_SID] ),
        "@FirstDate",
            CALCULATE(
                MIN( 'Snap Week Validation'[Snap_Week_Date] ),
                'Date Slicer'[Date] >= PreviousWeekEnd,
                REMOVEFILTERS(  'Date Slicer' ), REMOVEFILTERS( 'Close Date' )
            )
    )
VAR NewOnes = FILTER( NewOpportunityID, [@FirstDate] = CurrentWeekEnd )
VAR Result =
    CALCULATE(
        [TotalAmount],
        TREATAS( NewOnes, 'Opportunity Detail'[Opportunity_SID], 'Date Slicer'[Date] )
    )
RETURN
    Result
and the output of 01. New is as below when the date selected . But what I need is to show the total in Total row. Thanks Capture.JPG
vs_7
Continued Contributor
Continued Contributor

Hi  ,check below steps

 

Create a measure to calculate the total based on the selected date range. Let's assume the measure name is "Total Sales."

  • Total Sales = CALCULATE(SUM('YourTableName'[Sales]), 'YourTableName'[Date] IN ALLSELECTED('YourTableName'[Date]))

    Replace 'YourTableName' with the actual name of your table and '[Sales]' with the column name representing your sales.

  • Create a visual, such as a card or a table, to display the total sales. Drag the "Total Sales" measure to the values area of the visual.

  • Add a date slicer to the report canvas. Drag the "Date" column to the slicer visual.

  • Select the desired date range in the slicer. The "Total Sales" measure will dynamically update based on the selected date range.

@Tech122

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.