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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
kauschan65
Frequent Visitor

Dynamically update column based on date slicer on PowerBi

I am new to PowerBi and have questions regarding dynamic filtering based on datetime slicer . Say I have the following table:

enter image description here

Based on the date range(TableDateTime) I select from the slicer in powerbi i want to do the following :

If ApprovalInNumber. > 0 && if TimesApproved > 1 Get all the columns with Max(Rev) for this Id where Approvals/Rejects = Approve.

If ApprovalInNumber. < 1 Get all the columns with Max(Rev) for this Id where Approval/Rejects = Reject .

I would want to do this for all duplicate Id's . How can i achieve this dynamically based on the date range slicer . Any help is much appreciated

3 REPLIES 3
v-danhe-msft
Microsoft Employee
Microsoft Employee

Hi @kauschan65 ,

I could not understand the "achieve this dynamically based on the date range slicer"?

It seemed that your if statements related no data with your date range? And could you mean if 

ApprovalInNumber. > 0 && if TimesApproved > 1 

The desired result for id 127 where [REvNO]=2,3,4 should all be to 7(Max REv)?

 

Regards,

Daniel He

Community Support Team _ Daniel He
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

@v-danhe-msft: Appreciate the response. 

 

Taking the example of your case :

 

say my datetime slicer is from : 3/8 to 3/20

 

and ApprovalNumber > 0 && TimesApproved > 1 the desired result would be the Max Rev = 4 .  

 

But in case lets take the date range : 3/15 to 3/20 

 

where you dont have any instance of (ApprovalNumber > 0 && TimesApproved > 1) the desired result would be Max Rev = 7 

Hi @kauschan65 ,

If let take the date range : 3/15 to 3/20, there is no  row in ApprovalNumber > 0, I could not understand your condition: ApprovalNumber > 0 && TimesApproved > 1

If there is no data in ApprovalNumber > 0, why the desired result should be 7?

 

Regards,

Daniel He

Community Support Team _ Daniel He
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors