Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
I have a measure called "Total Applications" which I have ploted on a line chart against "Year" from a calendar as follows:
How can I get the maximum total applications for the date range on the plot?
Thanking you in advance
Hi @Chitemerere
You can refer to the following example:
calculate(Maxx(all(table),[Total Applications]),DATESBETWEEN(CALENDAR[Date],yourstartdate,yourenddate))
Best Regards!
Yolo Zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@Chitemerere , you need to set and use a Date table for this solution.
The logic for the measure is something like this:
Highest Total Applications =
VAR minDate = MIN(dimDate[Date])
VAR maxDate = MAX(dimDate[Date])
VAR result =
CALCULATE(
MAX('Table'[Value]),
'Table'[Date] >= minDate && 'Table'[Date] <= maxDate
)
RETURN
result
Thank you very much for your response. I am confused, which table and value are referred to above in 'Table' and 'Value'
Thank you very much. I am confused, wich table 'Table' and value 'Value' are referred here?
It's a general solution, you have change the table and value to your own datamodel.
We can help but you need to share the details of your model/measures.
Managed to solve it with the following DAX:
For the date of highest total application (MaxDate) you can try this:
MaxDate =
VAR maxvalue = 'Table'[Highest Total Applications]
VAR result =
CALCULATE(
VALUES(dimDate[Date]),
FILTER(
'Table',
'Table'[Value] = maxvalue
)
)
RETURN
result
User | Count |
---|---|
116 | |
73 | |
60 | |
48 | |
48 |
User | Count |
---|---|
171 | |
122 | |
60 | |
59 | |
56 |