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

dax measure show the highest value in a period

Hi guys,

 

Im trying to show only the month's max value along the period, but it isn't work it.

 

I have try a lot of option... I confess... I'm frustate. Here is the last formula.

 

MAXX Distinctcount Unique Contract = maxx(allselected(d_NTT_Dinamic_DataTable[Month Name]),DISTINCTCOUNTNOBLANK('BaseContratosMensais_IndicadorGerencial - SQL Results'[#UNIQUE_CONTRACT]))
 
 

max question.png

Tks,

---

Alexandre.

1 ACCEPTED SOLUTION
Anonymous
Not applicable

I have found a solution.

 

Top 1 Rank = CALCULATE([Distinctcount Unique Contracts],CALCULATETABLE(TOPN(1,ALL(d_NTT_Dinamic_DataTable[Month Name]),[Distinctcount Unique Contracts],DESC),ALL(d_NTT_Dinamic_DataTable),VALUES(d_NTT_Dinamic_DataTable[FY_NTT])))

 

After that, I have made a chart to highlight the major value.

 

Many thanks everybody.

 

truebeatles_0-1613590598488.png

 

View solution in original post

6 REPLIES 6
Anonymous
Not applicable

It changed a little bit, but it not what I'm looking for.

 
Top 1 Rank = CALCULATE([Distinctcount Unique Contracts],TOPN(1,ALL(d_NTT_Dinamic_DataTable[Month Name]),[Distinctcount Unique Contracts],DESC),VALUES(d_NTT_Dinamic_DataTable[Month Name]))
truebeatles_0-1612468243319.png

 

Tks,

---

Alexandre.

amitchandak
Super User
Super User

@Anonymous , Try TOPN on month

 

Top 1 Rank = CALCULATE([Distinctcount Unique Contract],TOPN(1,all(Table[Month Year]),[Distinctcount Unique Contract],DESC),VALUES(Table[Month Year]))

Anonymous
Not applicable

It changed a little bit, but it not what I'm looking for.


Top 1 Rank = CALCULATE([Distinctcount Unique Contracts],TOPN(1,ALL(d_NTT_Dinamic_DataTable[Month Name]),[Distinctcount Unique Contracts],DESC),VALUES(d_NTT_Dinamic_DataTable[Month Name]))

 

I'm looking for this.

max question1.png

Tks,
Alexandre.

@Anonymous , remove the other measure from the table and check.

Anonymous
Not applicable

Same.

truebeatles_0-1612535132351.png

 

Anonymous
Not applicable

I have found a solution.

 

Top 1 Rank = CALCULATE([Distinctcount Unique Contracts],CALCULATETABLE(TOPN(1,ALL(d_NTT_Dinamic_DataTable[Month Name]),[Distinctcount Unique Contracts],DESC),ALL(d_NTT_Dinamic_DataTable),VALUES(d_NTT_Dinamic_DataTable[FY_NTT])))

 

After that, I have made a chart to highlight the major value.

 

Many thanks everybody.

 

truebeatles_0-1613590598488.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.

Top Solution Authors