March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
Hi All,
i am trying to create a function that make change in max and min value with the change in date range filter , Data as follow:
VEHICLE NO. | TARE | DATE |
UP85CT5461 | 16630 | 4/9/2022 1:39 |
UP85CT5461 | 16520 | 4/10/2022 5:10 |
UP85CT5461 | 16510 | 4/11/2022 5:04 |
UP85CT5461 | 16580 | 4/12/2022 5:07 |
UP85CT5461 | 16490 | 4/13/2022 3:24 |
UP85CT5461 | 16560 | 4/14/2022 2:15 |
UP85CT5461 | 16530 | 4/15/2022 4:14 |
like when i select the date range in filter from 4/13/2022 to 4/15/2022 then max value = 16560 and min value = 16490 or
same goes for date range in filter from 4/10/2022 to 4/11/2022 then max value = 16520 and min value = 16510
whenever i change the date range then it start showing the max and min value of that date range.
Please help me out about how to create that date range which pull the data from that particular range.
Solved! Go to Solution.
HI @ayusharma,
If you want to use the slicer to choose the date range instead of filter on your table records, I'd like to suggest you create an unconnected data table as the source of the slicer.
Then you can use this new date table to create a slicer with 'between' mode and write DAX formulas to get aggregated values:
Min TARE =
CALCULATE (
MIN ( Table[TARE] ),
FILTER ( ALLSELECTED ( Table ), [Date] IN ALLSELECTED ( Calendar[Date] ) ),
VALUES ( Table[VEHICLE NO.] )
)
Max TARE =
CALCULATE (
MAX ( Table[TARE] ),
FILTER ( ALLSELECTED ( Table ), [Date] IN ALLSELECTED ( Calendar[Date] ) ),
VALUES ( Table[VEHICLE NO.] )
)
Regards,
Xiaoxin Sheng
HI @ayusharma,
If you want to use the slicer to choose the date range instead of filter on your table records, I'd like to suggest you create an unconnected data table as the source of the slicer.
Then you can use this new date table to create a slicer with 'between' mode and write DAX formulas to get aggregated values:
Min TARE =
CALCULATE (
MIN ( Table[TARE] ),
FILTER ( ALLSELECTED ( Table ), [Date] IN ALLSELECTED ( Calendar[Date] ) ),
VALUES ( Table[VEHICLE NO.] )
)
Max TARE =
CALCULATE (
MAX ( Table[TARE] ),
FILTER ( ALLSELECTED ( Table ), [Date] IN ALLSELECTED ( Calendar[Date] ) ),
VALUES ( Table[VEHICLE NO.] )
)
Regards,
Xiaoxin Sheng
this solution work thanks
i come up with dax query for this problem where i used it in the measure column:
for this i make a early date and end date for this and compare it with date and vehicle no.
this not what i looking for , i want max and min changes according to the date dail filter and the method that you suggested only showing one value , please help
Hey @ayusharma ,
use a slicer to filter your date range.
Then you can create a measure to create the MAX and the MIN value:
Max Value = MAX( myTable[myValue] )
Min Value = MIN( myTable[myValue] )
The measure will calculate depending on your slicer selection.
If you need any help please let me know.
If I answered your question I would be happy if you could mark my post as a solution ✔️ and give it a thumbs up 👍
Best regards
Denis
Blog: WhatTheFact.bi
Follow me: twitter.com/DenSelimovic
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
124 | |
89 | |
84 | |
70 | |
51 |
User | Count |
---|---|
206 | |
146 | |
97 | |
79 | |
69 |