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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
Brinki
Frequent Visitor

Incorrect totals

Hi all,

I'm trying to create a dynamic measure for prvouis year sales on weekly basis, howver cannot manage to get the correct grand total, it's still showing the full year total.

 

Thanks in advance.

 

Test PY = 
SUMX(
    SUMMARIZE('DimDate','DimDate'[Year]),

IF([CY Test] && [ShowValueForDates]=TRUE(),
CALCULATE([Gross VOL],
FILTER('DimDate','DimDate'[Year]=YEAR(TODAY())-1)),BLANK()))

 

Screenshot 2024-04-26 145937.png

 

1 REPLY 1
v-xiandat-msft
Community Support
Community Support

Hi @Brinki ,

Total calculations are not broken down in context like individual row calculations, especially when using complex DAX formulas involving conditional logic and time-smart functions. This often results in totals showing yearly totals instead of weekly totals.

When calculating totals, especially in the context of filters applied through slicers or report filters, using ALLSELECTED can sometimes provide better control over the context. This might not directly apply to your current formula but is worth considering if you're using any filters that could affect the calculation.

Best Regards,

Xianda Tang

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

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

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