Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
vividarinda
Helper II
Helper II

Get value based from same data and remark the value

I currently have data like this, 

vividarinda_0-1711096363270.png

 

But, how can I to set remark high and low based on date?

 

Thanks

2 ACCEPTED SOLUTIONS
Rohit11
Resolver I
Resolver I

Hi @vividarinda 

Try this DAX expression using calculated column, 

 

Calculated Column =

VAR CurrentDate = 'Table'[Date]
VAR MaxValue = CALCULATE(MAX('Table'[Value]), FILTER('Table', 'Table'[Date] = CurrentDate))
VAR MinValue = CALCULATE(MIN('Table'[Value]), FILTER('Table', 'Table'[Date] = CurrentDate))
RETURN
    IF('Table'[Value] = MaxValue, "High", IF('Table'[Value] = MinValue, "Low", BLANK()))
 
Rohit11_0-1711098825450.png

 

 

DAX expression using Measure, 

Measure =

VAR MaxValue = CALCULATE(MAX('Table'[Value]), FILTER(ALL('Table'), 'Table'[Date] = MAX('Table'[Date])))
VAR MinValue = CALCULATE(MIN('Table'[Value]), FILTER(ALL('Table'), 'Table'[Date] = MAX('Table'[Date])))
RETURN

    IF(
        SELECTEDVALUE('Table'[Value]) = MaxValue, "High",
            IF(SELECTEDVALUE('Table'[Value]) = MinValue, "Low",BLANK()))
 

Rohit11_0-1711102652413.png

 

Make this setting if you are not able to view measure with blank values . Right click on date and choose show items with no data. 

 

Rohit11_1-1711102725722.png

 



Don't forget to give thumbs up and accept this as a solution if it helped you!!!

 

Thank you, 

 

View solution in original post

@vividarinda 

Thanks for sending over .pbix file.

I've slightly modifed DAX expression for calculated column. 

Try with this updated DAX 


minmax =
VAR CurrentDate = FORMAT(datatkphcontoh[calendar],"m/d/yyyy")
VAR MaxValue = CALCULATE(MAX(datatkphcontoh[TKPH Site]), FILTER(datatkphcontoh, FORMAT(datatkphcontoh[calendar],"m/d/yyyy") = CurrentDate))
VAR MinValue = CALCULATE(MIN(datatkphcontoh[TKPH Site]), FILTER(datatkphcontoh, FORMAT(datatkphcontoh[calendar],"m/d/yyyy") = CurrentDate))
RETURN

    IF(datatkphcontoh[TKPH Site] = MaxValue, "High", IF(datatkphcontoh[TKPH Site] = MinValue, "Low", BLANK()))

 

Don't forget to give thumbs up and accept this as a solution if it helped you!!!

 

Thank you, 

View solution in original post

7 REPLIES 7
Rohit11
Resolver I
Resolver I

@vividarinda , I'm unable to see all columns in the new image you sent , if possible send .pbix file !  

 

Thanks.. 

Hi @Rohit11 , Link here : https://shorturl.at/vALPV

@vividarinda 

Thanks for sending over .pbix file.

I've slightly modifed DAX expression for calculated column. 

Try with this updated DAX 


minmax =
VAR CurrentDate = FORMAT(datatkphcontoh[calendar],"m/d/yyyy")
VAR MaxValue = CALCULATE(MAX(datatkphcontoh[TKPH Site]), FILTER(datatkphcontoh, FORMAT(datatkphcontoh[calendar],"m/d/yyyy") = CurrentDate))
VAR MinValue = CALCULATE(MIN(datatkphcontoh[TKPH Site]), FILTER(datatkphcontoh, FORMAT(datatkphcontoh[calendar],"m/d/yyyy") = CurrentDate))
RETURN

    IF(datatkphcontoh[TKPH Site] = MaxValue, "High", IF(datatkphcontoh[TKPH Site] = MinValue, "Low", BLANK()))

 

Don't forget to give thumbs up and accept this as a solution if it helped you!!!

 

Thank you, 

 

@vividarinda Great !! Please accept this as a solution if it helped you!!!

Hi @Rohit11 ,

Thanks a lot. It works 😁

vividarinda
Helper II
Helper II

Hi @Rohit11 ,

Thanks for your feedback. But in my row data display result like this, in the same date. Could you help me?

vividarinda_0-1711337475556.png

 

Vivid

Rohit11
Resolver I
Resolver I

Hi @vividarinda 

Try this DAX expression using calculated column, 

 

Calculated Column =

VAR CurrentDate = 'Table'[Date]
VAR MaxValue = CALCULATE(MAX('Table'[Value]), FILTER('Table', 'Table'[Date] = CurrentDate))
VAR MinValue = CALCULATE(MIN('Table'[Value]), FILTER('Table', 'Table'[Date] = CurrentDate))
RETURN
    IF('Table'[Value] = MaxValue, "High", IF('Table'[Value] = MinValue, "Low", BLANK()))
 
Rohit11_0-1711098825450.png

 

 

DAX expression using Measure, 

Measure =

VAR MaxValue = CALCULATE(MAX('Table'[Value]), FILTER(ALL('Table'), 'Table'[Date] = MAX('Table'[Date])))
VAR MinValue = CALCULATE(MIN('Table'[Value]), FILTER(ALL('Table'), 'Table'[Date] = MAX('Table'[Date])))
RETURN

    IF(
        SELECTEDVALUE('Table'[Value]) = MaxValue, "High",
            IF(SELECTEDVALUE('Table'[Value]) = MinValue, "Low",BLANK()))
 

Rohit11_0-1711102652413.png

 

Make this setting if you are not able to view measure with blank values . Right click on date and choose show items with no data. 

 

Rohit11_1-1711102725722.png

 



Don't forget to give thumbs up and accept this as a solution if it helped you!!!

 

Thank you, 

 

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.