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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
v-alq-msft
Community Support
Community Support

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.

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
amitchandak
Super User
Super User

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

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

 

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.