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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
zia1991
New Member

divide function

zia1991_0-1713425174792.png

I am new to power bi,Actually i want to divide BL with TBL to get thier ratio,but it give me only one vlaue for the first row,I want the function that resuilt for all row.

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Thanks @PowerBigginer 

Hi, @zia1991 

Based on the data provided by your picture, I guess your BL and TBL are both a metric, so I created the following sample data:

vjianpengmsft_0-1713489451108.png

I created two measures and placed them in the table visual:

vjianpengmsft_1-1713490026792.png

vjianpengmsft_2-1713490039980.png

I use the following DAX to divide each row:

MEASURE =
VAR _seletedvalue =
    CALCULATE ( [TBL1], ALL ( 'Table' ) )
RETURN
    DIVIDE ( [BL1], _seletedvalue, 0 )

Here are the results:

vjianpengmsft_3-1713490163451.png

I've provided the PBIX file used this time below.

 

 

 

How to Get Your Question Answered Quickly

If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .

Best Regards

Jianpeng Li

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
Anonymous
Not applicable

Thanks @PowerBigginer 

Hi, @zia1991 

Based on the data provided by your picture, I guess your BL and TBL are both a metric, so I created the following sample data:

vjianpengmsft_0-1713489451108.png

I created two measures and placed them in the table visual:

vjianpengmsft_1-1713490026792.png

vjianpengmsft_2-1713490039980.png

I use the following DAX to divide each row:

MEASURE =
VAR _seletedvalue =
    CALCULATE ( [TBL1], ALL ( 'Table' ) )
RETURN
    DIVIDE ( [BL1], _seletedvalue, 0 )

Here are the results:

vjianpengmsft_3-1713490163451.png

I've provided the PBIX file used this time below.

 

 

 

How to Get Your Question Answered Quickly

If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .

Best Regards

Jianpeng Li

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

 

 

 

 

PowerBigginer
Helper II
Helper II

But you don't have any values in TBL If you don't have values you can replace with 0

Try this  = DIVIDE([BL],[TBL],0)
For more Power BI tips and Tricks https://powertipstricks.blogspot.com/ check out the blog
If it works Please Mark As A solution !

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Fabric Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.