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

TOTAL SUM AND TOTAL COUNT OF A EXPRESSION WITH A SELECTED DAY

hi,

 

I need hope to solve this calculation:

Grid.PNG

 

 

 

Meet 50% is an expression : IF([SUM_RESULT]>5;1;0)

 

SUM_RESULT = calculate(sum(TABLE[RESULT_CONDIZIONE]);DATESBETWEEN(TABLE_CALENDAR[Day].[Date];TABLE[12_previous_month];TABLE[select_month]))

 

 

12_previous_month = IF(HASONEVALUE(TABLE_CALENDAR[Day]);DATEADD(VALUES(TABLE_CALENDAR[Day]);-12;MONTH))

 

select_month = SELECTEDVALUE(TABLE_CALENDAR[Day])

 

 

I would to read in the box TOTAL 50% the total of Meet 50% (in this ex.:5). 

I would to read in the box COUNT 50% the COUNT of values (in this ex.:14).

 

I try without success with:

 

TOTAL 50% = SUMX(TABLE;IF([SUM_RESULT]>5;1;0))

COUNT 50% = COUNTX(TABLE;IF([SUM_RESULT]>5;1;0))

 

 

Greetings ans thanks

Valentina

1 ACCEPTED SOLUTION

Accepted Solutions
vmontaldo
Frequent Visitor

Re: TOTAL SUM AND TOTAL COUNT OF A EXPRESSION WITH A SELECTED DAY

yesterday I risolved :

 

TOTAL 50%= 

    SUMX (
        SUMMARIZE( TABLE;

                               TABLE[n_PLA];

                               TABLE[KPI_DESCRIPTION];

                               "Meet 50%";IF([SUM_RESULT]>5;1;0)

              )
       ;  [Meet 50%]

)

 

COUNT 50%  = 

    COUNTX (
        SUMMARIZE( TABLE;

                               TABLE[n_PLA];

                               TABLE[KPI_DESCRIPTION];

                               "Meet 50%";IF([SUM_RESULT]>5;1;0)

                   )
       ;  [Meet 50%]

)

 

Regards thanks Valentina

 

 

View solution in original post

2 REPLIES 2
Moderator v-qiuyu-msft
Moderator

Re: TOTAL SUM AND TOTAL COUNT OF A EXPRESSION WITH A SELECTED DAY

Hi @vmontaldo,

 

From your description, both [SUM_RESULT] and [Meet 50%] are measures, right? As you don't provide sample data, I use some dummy data to test on my side.

 

1. You can create the measures below:
Total 50% = SUMX(Sheet1,Sheet1[Meet 50%])
Total count = COUNTX(Sheet1,Sheet1[Sum-result])

 

2.Create a table to add your [n_PLA], [Sum_result] and [Meet 50%] fields.

3.Create two Card visuals to show your [Total 50%] and [Total count] measure.

 

q5.jpg

Best Regards,

Qiuyun Yu

Community Support Team _ Qiuyun Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
vmontaldo
Frequent Visitor

Re: TOTAL SUM AND TOTAL COUNT OF A EXPRESSION WITH A SELECTED DAY

yesterday I risolved :

 

TOTAL 50%= 

    SUMX (
        SUMMARIZE( TABLE;

                               TABLE[n_PLA];

                               TABLE[KPI_DESCRIPTION];

                               "Meet 50%";IF([SUM_RESULT]>5;1;0)

              )
       ;  [Meet 50%]

)

 

COUNT 50%  = 

    COUNTX (
        SUMMARIZE( TABLE;

                               TABLE[n_PLA];

                               TABLE[KPI_DESCRIPTION];

                               "Meet 50%";IF([SUM_RESULT]>5;1;0)

                   )
       ;  [Meet 50%]

)

 

Regards thanks Valentina

 

 

View solution in original post

Helpful resources

Announcements
New Ranks Launched March 24th!

New Ranks Launched March 24th!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power BI Community!

‘Better Together’ Contest Finalists Announced!

‘Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

Arun 'Triple A' Event Video, Q&A, and Slides

Arun 'Triple A' Event Video, Q&A, and Slides

Missed the Arun 'Triple A' event or want to revisit it? We've got you covered! Check out the video, Q&A, and slides now.

Join THE global Microsoft Power Platform event series.

Join THE global Power Platform event series.

Attend for two days of expert-led learning and innovation on topics like AI and Analytics, powered by Dynamic Communities.

Community Summit North America

Community Summit North America

Innovate, Collaborate, Grow. The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors