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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
diego-jd
New Member

Aggregate measure by value

I am using the Usage Metrics Report dataset to create a Dashboard. There, I created the measure days_without_views, that calculates the days that have passed since the report was last seen with this formula:

 

 

 

days_without_views = DATEDIFF(MAXX(
    KEEPFILTERS(VALUES('Views'[Date])),
    CALCULATE(MAX('Views'[Date]))
), TODAY(), DAY)

 

 

 

 

In the report table I created a column called Area. Each report belongs to a certain area (Marketing, Finance, etc.)
What I want to do is, in any visualization (table, graph, etc.)  obtain the sum of days_without_views by area. When creating a table and putting area and days_without_views it seems to grab just a single value instead of summing it .

Aggregated table

Areadays_without_views
Marketing1
IT3
Finance2

 

 

Data

ReportAreadays_without_views
Report 1Finance3
Report 2Finance2
Report 3 Marketing1
Report 4Marketing8
Report 5Marketing2
1 ACCEPTED SOLUTION
v-jingzhan-msft
Community Support
Community Support

Hi @diego-jd 

 

You may create a new measure as below, which uses your current measure for each area

total =
VAR vtable =
    SUMMARIZE (
        'ReportTable',
        'ReportTable'[Report],
        'ReportTable'[Area],
        "days", [days_without_views]
    )
RETURN
    SUMX ( vtable, [days] )

 

Best Regards,
Jing
If this post helps, please Accept it as Solution to help other members find it. Appreciate your Kudos!

View solution in original post

1 REPLY 1
v-jingzhan-msft
Community Support
Community Support

Hi @diego-jd 

 

You may create a new measure as below, which uses your current measure for each area

total =
VAR vtable =
    SUMMARIZE (
        'ReportTable',
        'ReportTable'[Report],
        'ReportTable'[Area],
        "days", [days_without_views]
    )
RETURN
    SUMX ( vtable, [days] )

 

Best Regards,
Jing
If this post helps, please Accept it as Solution to help other members find it. Appreciate your Kudos!

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors