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

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now

Reply
AjithTravvise
Helper II
Helper II

Filtered sum

Hello,

 

      I have the below table and I wated to show the "country wise" sum of "total_test" in my report, but unfortunately its giving me a wrong value. If no filter applied the total value should appear.

 

Total test.jpg 

6 REPLIES 6
v-deddai1-msft
Community Support
Community Support

Hi @AjithTravvise ,

 

Would you please use the following measure :

 

 

Test Completed =

CALCULATE (

    SUM ( 'owid-covid-data'[total_tests] ),

    FILTER (

        ALLSELECTED ( 'owid-covid-data' ),

        'owid-covid-data'[date] IN DISTINCT ( 'owid-covid-data'[date] )

    )

)

 

 

If it doesn't meet your requirement, Could you please inform us more detailed information, such as  your expected output.

 

Best Regards,

Dedmon Dai

The data is cummulative so its adding up alltogether, please try using "Country/ Region" filter and select "Australia" 

iso_codeCountry/Regiondatetotal_casesnew_casestotal_deathsnew_deathstotal_cases_per_millionnew_cases_per_milliontotal_deaths_per_millionnew_deaths_per_milliontotal_testsnew_teststotal_tests_per_thousandnew_tests_per_thousandtests_units
ARGArgentina4/7/202016287453736.0211.6371.1730.155nullnullnullnull 
ARGArgentina4/8/202017158760737.9461.9251.3280.15513330null0.295nulltests performed
ARGArgentina4/9/202017958065539.7161.771.4380.1111485015200.3290.034tests performed
ARGArgentina4/10/2020189499791441.9072.191.7480.311637915290.3620.034tests performed
ARGArgentina4/11/202019758182343.6991.7921.8140.0661802716480.3990.036tests performed
AUSAustralia1/30/202062000.2350.0780054null0.002nullunits unclear
AUSAustralia1/31/202071000.2750.0390071170.0030.001units unclear
AUSAustralia2/1/202092000.3530.0780090190.0040.001units unclear
AUSAustralia2/2/2020112000.4310.07800105150.0040.001units unclear

I have edit my original reply, Would you please check if it meets your requirements? And if it doesn't, please give more details about what you want.

I tried it but its giving me the total of all values, i need the sum. The valued in the column is cumulative so teh result is adding all the vaules.

 

The below measure worked, but the issue is certain countires the last date is still not updated, so for those i wanted to display the previous date number. 

 

Max Date.png 

amitchandak
Super User
Super User

@AjithTravvise ,Can you share sample data and sample output.

 

The formula above seems to compare it with the max date. So I doubt, what you are planning to get

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

February Power BI Update Carousel

Power BI Monthly Update - February 2026

Check out the February 2026 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.