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
Anonymous
Not applicable

Help - Calculate the mode

necesito calcular la moda o el valor que mas se repite dependiendo de la categoria o estado que tenga en mi tabla por ejemplo quiero calcular su moda para cada estado

 

ayamaya_1-1652282318687.png

Para mi ejemplo de tabla, el valor repetido "investigando y/o diseñando" es 48 en el recuento de fechas y para su estado. No sé cómo obtener esos datos en este momento.

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Good morning, I did what you told me but it didn't work for me I attach my complete file so you can review it and tell me what mistake I'm making. Archivo  The document is in the file link.

 

ayamaya_0-1652710889996.png

CALCULATE (
SUM (Hoja1[Work Hour]),
FILTER (
ALLSELECTED (Hoja1),
[issues.changelog.histories.items.fromString]= MAX ( Hoja1[issues.changelog.histories.items.fromString] )
&& [Change Status2] = MAX ( Hoja1[Change Status2] )
)
)

 

View solution in original post

4 REPLIES 4
v-stephen-msft
Community Support
Community Support

Hi @Anonymous ,

 

I made a test from my sample data I created myself.

The measure is this.

Dup =
CALCULATE (
    SUM ( 'Table'[Work Hour] ),
    FILTER (
        ALLSELECTED ( 'Table' ),
        [Status] = MAX ( 'Table'[Status] )
            && [Change Status2] = MAX ( 'Table'[Change Status2] )
    )
)

vstephenmsft_0-1652693061592.png

 

 

 

Best Regards,

Stephen Tao

 

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

 

 

Anonymous
Not applicable

Good morning, I did what you told me but it didn't work for me I attach my complete file so you can review it and tell me what mistake I'm making. Archivo  The document is in the file link.

 

ayamaya_0-1652710889996.png

CALCULATE (
SUM (Hoja1[Work Hour]),
FILTER (
ALLSELECTED (Hoja1),
[issues.changelog.histories.items.fromString]= MAX ( Hoja1[issues.changelog.histories.items.fromString] )
&& [Change Status2] = MAX ( Hoja1[Change Status2] )
)
)

 

Anonymous
Not applicable

Tell you that the Date column and the work hours column are personalized, the source of my dataset does not come, therefore, this option is not viable, I should do it through Dax, I have used this:
MINX(
TOPN (
one,
ADDCOLUMNS (
VALUES ( SREs[Work Hour] ),
"Frequency", CALCULATE ( COUNT ( SREs[Work Hour] ) )
),
[Frequencies],
0
),
SREs[Work Hours]
)
__________________________________

But it didn't work for me, because I have to evaluate by category, I should do that for each category I find the mode including the date.

 

ayamaya_0-1652295420685.png

 

tom480
Resolver I
Resolver I

Hi @Anonymous ,

 

Check this solution and see if it works.  1) Here I am doing a group by with status and date which duplicate the results of a matrix tile.  2) Next I just create a copy of the values column 3) And last step, I keep duplicates.  

 

You can see the results in Matrix tile (last screenshot) that gives you the duplicated values by status.  

 

If this works for you, please mark as a solution and help others know it worked for you!  Adios!  Tomas

 

help duplicates1.pnghelp duplicates2.pnghelp duplicates3.pnghelp duplicates4.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.