Forum Discussion
AllanBerces
11 months agoPost Prodigy
Max Count
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 MEAS...
- 11 months ago
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 ) )
Shahid12523
11 months agoCommunity Champion
MaxLaborTypeDate =
CALCULATE (
MAX ( 'YourTable'[Date] ),
TOPN (
1,
SUMMARIZE ( 'YourTable', 'YourTable'[Date], "Count", COUNTROWS ( 'YourTable' ) ),
[Count], DESC
)
)
- AllanBerces11 months agoPost Prodigy
Hi Shahid12523 thank you very much for the reply but data show on the measure