The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
I have following data where there are multiple claim IDs.
For a single claim ID there are different dates and different claim types.
I need to get the Minimum date for a particular Claim ID and Claim Type.
Eg. I need following result in a table.
How to get this through DAX? Do I need to create a measure or a calculated column?
Solved! Go to Solution.
try this measure,
Min Claim Date = CALCULATE(
MIN('Table'[Claim Date]),
ALLEXCEPT('Table','Table'[Claim ID],'Table'[Claim Type]))
Hello @Arul
Thank you. I got the values.
Can you also tell how I can get Max along with Min dates? With the same logic?
hello @Vishruti
use below dax for calculated column;
MinimumDate =
VAR MinDate = CALCULATE(MIN('Claim Table'[Date]), ALLEXCEPT('Claim Table', 'Claim Table'[Claim ID], 'Claim Table'[Claim Type]))
RETURN IF(ISBLANK(MinDate), BLANK(), MinDate)
use below dax for measure:
MinimumDateMeasure =
MINX(
VALUES('Claim Table'[Claim ID] & "-" & 'Claim Table'[Claim Type]),
CALCULATE(MIN('Claim Table'[Date]))
)
https://analyticpulse.blogspot.com
User | Count |
---|---|
78 | |
74 | |
43 | |
32 | |
28 |
User | Count |
---|---|
104 | |
93 | |
51 | |
51 | |
46 |