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.
how would i do this in Power BI Dax?
I have the following table containing 2 columns:
Date,Temperature
which contains multiple temperatures per day so multiple rows per day in the table
I am looking for the coldest date in 2022 and 2023 based on the temperature column. please advise.
Solved! Go to Solution.
Hi, @pbrosnan
You can try the following methods.
Measure = Var _mintem=CALCULATE(MIN('Table'[temperature]),ALL('Table'))
Return
CALCULATE(MAX('Table'[date]),FILTER(ALL('Table'),[temperature]=_mintem))
Is this the result you expect?
Best Regards,
Community Support Team _Charlotte
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @pbrosnan possible solution: create 2 measures, one for identification of Min temp and finding date for this Min date. Edit Sheet1 to your table name
Did I answer your question? Kudos appreciated / accept solution!
Proud to be a Super User!
Hi @pbrosnan try with following measures per years. For Max date, just replace MINX with MAXX
Coldest_Date_year_2022 = MINX(
FILTER(yourtablename, YEAR(yourtablename[Date]) = 2022),
yourtablename[Date])
Coldest_Date_year_2023 = MINX(
FILTER(yourtablename, YEAR(yourtablename[Date]) = 2023),
yourtablename[Date])
Proud to be a Super User!
i need the date filter to be variable between 01-01-2022 and 31-12-2023. as i am using a date slicer as the filter.
Hi @pbrosnan so you want result as calculated column or something else. Please describe.
Proud to be a Super User!
i have a table containing these rows and columns:
date,temperature
01-01-2021,150
01-01-2021,120
02-01-2021,120
02-01-2021,110
03-01-2022,160
03-01-2022,170
05-01-2022,160
05-01-2022,180
i want to return the date that has the lower temperature which is 02-01-2021 so how do i calculate it? there are multiple temperatures per day.
Hi, @pbrosnan
You can try the following methods.
Measure = Var _mintem=CALCULATE(MIN('Table'[temperature]),ALL('Table'))
Return
CALCULATE(MAX('Table'[date]),FILTER(ALL('Table'),[temperature]=_mintem))
Is this the result you expect?
Best Regards,
Community Support Team _Charlotte
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
14 | |
11 | |
8 | |
8 | |
8 |
User | Count |
---|---|
22 | |
13 | |
11 | |
10 | |
10 |