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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.

Reply
Spotto
Helper IV
Helper IV

How to show a result only once per index and product

hello guys, I need some help, I made a table that contains a measure that calculates the difference between two columns and back 1 or 0, when it brings 1 it shows a red icon as below (x in red)

Capture.PNG

Sla Estourado =
var SlaAcum = _Medidas[Acumulado sla]
var SlaAtual = SUM('Relatório de Histórico de Casos'[SLA Actual])
return
if((SlaAtual - SlaAcum)>0,0,1)
 
-----------------------------------------
I would like to get the index, nr Caso, and show only the first time the measure returns 1 (x in red) in DAX
 
result.png

 

Arquivo SLA 

I thank the help of all you 🙂

2 ACCEPTED SOLUTIONS
Anonymous
Not applicable

I exported you calculated table and applied to it your requirements.

see if it is what you are after

View solution in original post

Anonymous
Not applicable

Hi @Spotto ,

 

But that's okay, I'll give an example to demonstrate how to keep the first line and delete the others.

1.Create a conditional column named Custom.

vstephenmsft_1-1648027475770.png

vstephenmsft_2-1648027481264.png

 

2.Select both the Nr CASO column and the Custom column, then group by

vstephenmsft_3-1648027539666.png

vstephenmsft_6-1648027717213.png

 

 

 

3.Add another custom column, if custom column = 1, then return the first row in the Count column, otherwise return the Count column.

vstephenmsft_5-1648027565668.png

vstephenmsft_7-1648027725473.png

 

4.Expand the rows and remove the unneeded columns, get the result.

vstephenmsft_8-1648027766774.png

 

Hope it helps you.

 

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.

View solution in original post

5 REPLIES 5
Anonymous
Not applicable

I believe that with the function table.group and table.first or table.min you could solve your problem.
if you want more specific help upload an input table so it can be copied easily.

I put the attached file, thanks for the help 🙂

Anonymous
Not applicable

I exported you calculated table and applied to it your requirements.

see if it is what you are after

it worked thanks, but the columns, formulas, measurements I did in DAX, I would have to do all of them in power query M to be able to group as you did?
From your example I even thought of using summarize but it didn't work.

Anonymous
Not applicable

Hi @Spotto ,

 

But that's okay, I'll give an example to demonstrate how to keep the first line and delete the others.

1.Create a conditional column named Custom.

vstephenmsft_1-1648027475770.png

vstephenmsft_2-1648027481264.png

 

2.Select both the Nr CASO column and the Custom column, then group by

vstephenmsft_3-1648027539666.png

vstephenmsft_6-1648027717213.png

 

 

 

3.Add another custom column, if custom column = 1, then return the first row in the Count column, otherwise return the Count column.

vstephenmsft_5-1648027565668.png

vstephenmsft_7-1648027725473.png

 

4.Expand the rows and remove the unneeded columns, get the result.

vstephenmsft_8-1648027766774.png

 

Hope it helps you.

 

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.

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors