The ultimate Microsoft Fabric, Power BI, Azure AI, and SQL learning event: Join us in Stockholm, September 24-27, 2024.
Save €200 with code MSCUST on top of early bird pricing!
Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
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
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Check out the August 2024 Power BI update to learn about new features.
User | Count |
---|---|
112 | |
80 | |
75 | |
52 | |
50 |
User | Count |
---|---|
133 | |
124 | |
78 | |
64 | |
61 |