cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
amelief Frequent Visitor
Frequent Visitor

Filtered calculation

Hi everyone, 

I don't anderstand why ont of my filter isn't working... 

I hope you will see something I can't ! 

 

I make this table calculated : 

assistance_access = 
ADDCOLUMNS(
    ADDCOLUMNS(
        SUMMARIZE(
            'Enquête';
            'Enquête'[Année];
            'Enquête'[Comment évalueriez-vous l'accessibilité de ce service ?];
            "total";
            SUM('Enquête'[Comment évalueriez-vous l'accessibilité de ce service ?])
        );
        "total_y";
        CALCULATE(sum('Enquête'[Comment évalueriez-vous l'accessibilité de ce service ?]);FILTER('Enquête';'Enquête'[Année]=[Année]))
   );
   "percent";DIVIDE([total]*100;[total_y])
   )

The red line working not well ! This the results :

Capturepbi.JPG

 

What I'm excpecting is to have in total_y the sum of the total per year. 

 

Have you an idea ?

thanks a lot for your help !

1 ACCEPTED SOLUTION

Accepted Solutions
amelief Frequent Visitor
Frequent Visitor

Re: Filtered calculation

I found a way ! 

 

assistance_access = ADDCOLUMNS(ADDCOLUMNS(SUMMARIZE('Enquête';'Enquête'[Année];
    'Enquête'[Comment évalueriez-vous l'accessibilité de ce service ?]
            ;"total";SUM(
    'Enquête'[Comment évalueriez-vous l'accessibilité de ce service ?]
            ));"total_y";CALCULATE(SUM(
    'Enquête'[Comment évalueriez-vous l'accessibilité de ce service ?]
            );ALL('Enquête');'Enquête'[Année]=EARLIER('Enquête'[Année])));"percent";DIVIDE([total]*100;[total_y]))

View solution in original post

1 REPLY 1
amelief Frequent Visitor
Frequent Visitor

Re: Filtered calculation

I found a way ! 

 

assistance_access = ADDCOLUMNS(ADDCOLUMNS(SUMMARIZE('Enquête';'Enquête'[Année];
    'Enquête'[Comment évalueriez-vous l'accessibilité de ce service ?]
            ;"total";SUM(
    'Enquête'[Comment évalueriez-vous l'accessibilité de ce service ?]
            ));"total_y";CALCULATE(SUM(
    'Enquête'[Comment évalueriez-vous l'accessibilité de ce service ?]
            );ALL('Enquête');'Enquête'[Année]=EARLIER('Enquête'[Année])));"percent";DIVIDE([total]*100;[total_y]))

View solution in original post

Helpful resources

Announcements
Exclusive LIVE Community Event #3 – Ask Arun Anything

Exclusive LIVE Community Event #3 – Ask Arun Anything

Join us in the third Triple A event!

Meet the 2020 Season 1 Power BI Super Users!

Meet the 2020 Season 1 Power BI Super Users!

It’s the start of a new Super User season! Learn all about the new Super Users and brand-new tiered recognition system.

Super User Challenge: Can You Solve These?

Super User Challenge: Can You Solve These?

We're celebrating the start of the New Super User season with our first ever Super User 'Can You Solve These?' challenge.

Power BI Desktop Update - February 2020

Power BI Desktop Update - February 2020

We are super excited for our update this month, as we are releasing two of our top community requests!

Power Platform Online Conference

Power Platform Online Conference

Join us for the first ever Power Platform Online Conference!

Top Solution Authors