Don't miss your chance to take the Fabric Data Engineer (DP-700) exam on us!
Learn moreWe've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now
Hi good day can someone help me on my maeasure, on my table with column Date, BP's, laborType. i want to get the highest count of Labortype on what date.
From my table
DESIRED RESULT OF MEASURE - Only the Date with the highest count
Thank you
Solved! Go to Solution.
Hi @AllanBerces .
Create a virtual summarized table of each date and the value. Pick the one with the highest value using TopN and use that top date as a filter
Max Value Date =
VAR TopDate =
CALCULATE (
MAXX (
TOPN (
1,
ADDCOLUMNS (
SUMMARIZE ( ALLSELECTED ( Dates ), Dates[Date] ),
"@value", [Total Transactions] -- or your count measure
),
[@value], DESC
),
[Date]
),
ALLSELECTED ()
)
RETURN
CALCULATE ( [Total Transactions], KEEPFILTERS ( Dates[Date] = TopDate ) )
Hi @AllanBerces .
Create a virtual summarized table of each date and the value. Pick the one with the highest value using TopN and use that top date as a filter
Max Value Date =
VAR TopDate =
CALCULATE (
MAXX (
TOPN (
1,
ADDCOLUMNS (
SUMMARIZE ( ALLSELECTED ( Dates ), Dates[Date] ),
"@value", [Total Transactions] -- or your count measure
),
[@value], DESC
),
[Date]
),
ALLSELECTED ()
)
RETURN
CALCULATE ( [Total Transactions], KEEPFILTERS ( Dates[Date] = TopDate ) )
Hi @danextian @Shahid12523 @rohit1991 thank you very much for the reply working as i need
Hello @AllanBerces,
The comment you were responding to has been removed.
Best,
Natalie H.
Community Manager
Hi @AllanBerces
You can achieve this directly using a Top N filter on the Matrix visual.
Steps:
Create a simple measure for your counts:
Total Count =
SUM ( Fact[Qty] )
Build your Matrix:
In the Filters on this visual pane:
Result:
The Matrix now shows only the date that has the highest total count (in your case, 2 June 2025 = 234) along with the LaborType breakdown underneath.
Hi @rohit1991 thank you very much for the reply but i cant used that way, i will add this measure to other table
MaxLaborTypeDate =
CALCULATE (
MAX ( 'YourTable'[Date] ),
TOPN (
1,
SUMMARIZE ( 'YourTable', 'YourTable'[Date], "Count", COUNTROWS ( 'YourTable' ) ),
[Count], DESC
)
)
Hey @AllanBerces,
You can try using this measure:
Max Count =
VAR MaxCountInTable =
CALCULATE(
MAX([Count]),
ALLSELECTED()
)
RETURN
IF(
[Count] = MaxCountInTable,
[Count],
BLANK()
)
Fixed? ✓ Mark it • Share it • Help others!
Best Regards,
Jainesh Poojara | Power BI Developer
Hi @jaineshp thank you very much for the reply but i dont know where can i get the count you used on the measure. I try to used the measure i created but show error
My Measure on count
Hi,
Share some data to work with and show the expected result. Share data in a format that can be pasted in an MS Excel file.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 55 | |
| 40 | |
| 36 | |
| 20 | |
| 18 |
| User | Count |
|---|---|
| 74 | |
| 72 | |
| 38 | |
| 35 | |
| 26 |