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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
mohanpal
Frequent Visitor

Calculation based on Date selection

Hi, 

I need to replicate COL B in PowerBI, it should dynamically change the value based on date selection.

 

For example: if I select date 02/01/2021, it should change to that date and make default value of  100  against that date.

I have tried using MIN, max date and If condition but it's not working. 

 

mohanpal_1-1660714417761.png

 

 

1 ACCEPTED SOLUTION
v-zhangti
Community Support
Community Support

Hi, @mohanpal 

 

You can try the following methods.

Measure:

COL B =
IFERROR (
    100 * SELECTEDVALUE ( 'Table'[Date] )
        / CALCULATE ( MIN ( 'Table'[Date] ), ALL ( 'Table' ) ),
    BLANK ()
)

 

vzhangti_0-1661146589018.pngvzhangti_1-1661146609505.png

You can select output values by date. 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.

View solution in original post

2 REPLIES 2
v-zhangti
Community Support
Community Support

Hi, @mohanpal 

 

You can try the following methods.

Measure:

COL B =
IFERROR (
    100 * SELECTEDVALUE ( 'Table'[Date] )
        / CALCULATE ( MIN ( 'Table'[Date] ), ALL ( 'Table' ) ),
    BLANK ()
)

 

vzhangti_0-1661146589018.pngvzhangti_1-1661146609505.png

You can select output values by date. 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.

Dhacd
Resolver III
Resolver III

@mohanpal Try using a measure, the calculated column will run once when you open the report. 

If you need help in writing the measure just reply.

 

Use the selectedvalue function in measure to achieve the same.

If this post helps, then please consider accepting it as the solution to help the other members find it more quickly.

Thanks and Regards,
Atma.

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

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.