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
bcmoulam
New Member

Ratio Calculation between two user-selected columns

Hi all, 

Ref example table below. Various numeric metrics for each month - there are about 30 total columns similar to the examples (events, defects etc.)

 

Dateeventsdefectsdelayscyclesdefects/cycles
Jan-22111923224310.038
Feb-2211785921620.039
Mar-2240743323560.031
Apr-2260733828200.026
May-22122891323200.038
Jun-2292714021400.033
Jul-2241912126170.035
Aug-22106733028300.026
Sep-2253632429680.021
Oct-2238601729060.021
Nov-2214862620550.030
Dec-22110602828870.021
Jan-23130624025130.025
Feb-23132902621980.041
Mar-23117992926550.037
Apr-2339853920180.042
May-2366842829470.029
Jun-23141952223130.041
Jul-2362821525810.032

 

I'd like to calculate ratio's between the columns based on user-input - I'm imagining two filters titled Numerator & Denominator. The two filter values are passed to a Measure(?) that then calculates the ratio for each row. In the above example the user would have selected 'defects' in the Numerator filter and 'cycles' in the Denominator filter. That result is then plotted in a line chart over time.

 

bcmoulam_0-1675212488077.png

 

I know I can create loads of calculated columns to do this up-front for all the possible combinations, but was wondering if possible to do this dynamically based on user input?

 

I've looked at other similar articles but they don't quite fit what I'm after - any help appreciated. 

Thanks

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@bcmoulam , This is the old measure slicer way, You have to create two such tables and slicer and then create combined measure using a divide

 

How to create a Measure Slicer: https://youtu.be/b9352Vxuj-M

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

2 REPLIES 2
bcmoulam
New Member

Perfect, thanks Amit!

amitchandak
Super User
Super User

@bcmoulam , This is the old measure slicer way, You have to create two such tables and slicer and then create combined measure using a divide

 

How to create a Measure Slicer: https://youtu.be/b9352Vxuj-M

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

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