cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
juanso14 Helper I
Helper I

Sum of a Measure

Hello, I need Help with the sum of a measure I have the following measure:

 

Contador jornada 2 =
Var CONDICIONAL1 = CALCULATE(COUNT('Citas-Reuniones'[Count of equals]); 'Citas-Reuniones'[Count of equals] <3)
Return
IF(CONDICIONAL1>3;1;COUNTX('Citas-Reuniones';'Citas-Reuniones'[Count of equals]))
 
But I am not available to incorporate the HASONFILTER,  I try the following post without any sucess :
 
 

I need to sum the total activities a user made, but if they made more than 3 activities in 1 day, that must count like only 1. I attach a view.

 

 
 

Captura.PNG

 

Thanks,

4 REPLIES 4
Super User IV
Super User IV

Re: Sum of a Measure

 Can you please explain with an example.Can you share sample data and sample output.





Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
In case it does not help, please provide additional information and mark me with @
My Recent Blog -Week is not so Weak Proud to be a Super User! Connect on Linkedin


juanso14 Helper I
Helper I

Re: Sum of a Measure

Hello, I can´t share a sample because is sensible information. But i made a resume view below. I want to filter the New:interacciondiaria = 100000021 and with than info when the count of subject is higher than 3 (I highlight one with 6), in that cases i want to show a 1. And after that I want to SUM all that counts. Captura2.PNG

 

 
Community Support
Community Support

Re: Sum of a Measure

Hi, @juanso14 

 

Based on your description, I created data to reproduce your scenario.

c1.png

You may create two measures as follows.

 

Modified = 
IF(
        MAX('Table'[New interacciondiaria]) =100000021&&
        MAX('Table'[CountOfsubject])>3,
        1,
        MAX('Table'[CountOfsubject])
)

Result = 
SUMX(
    ALLSELECTED('Table'),
    [Modified]
)

 

 

Result:

c2.png

 

Best Regards

Allan

 

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

juanso14 Helper I
Helper I

Re: Sum of a Measure

Hello, thank you for the answer but I have a problem with the result:

 

I Made one column before because i didnt have that value of count of subject (in the other view because I count in the view) 

CountofSubject = CALCULATE(
COUNTROWS('Citas-Reuniones');FILTER('Citas-Reuniones';'Citas-Reuniones'[concatenado]=EARLIER('Citas-Reuniones'[concatenado])))
 
But when i see the results the sum is not ok, maybe is something with the visual filters?
 
Captura3.PNG
I noticed that in your table you have a 5 and a 4 that doesn´t change the value. 
 
Thank you, 
Best Regards

Helpful resources

Announcements
Announcing the New Spanish Forum

Announcing the New Spanish Forum

Do you need help in Spanish? Check out our new Spanish community section.

MBAS Gallery 2020

MBAS Gallery 2020

Watch Microsoft Business Applications Summit sessions on-demand.

‘Better Together’ Integration Forum Launch

‘Better Together’ Integration Forum Launch

We've launched a how-to forum where you can learn about how Power BI integrates with other Power Platform products.

Top Solution Authors
Top Kudoed Authors