Reply
Johel_D
Frequent Visitor

Compare table results

Hello All, I need some help with some results that I am getting on one of my dashboards.

 

What I need is to get the ratio between the two numbers, however, when I do the calculations the results are not correct, for instance:

Earn hours:

Johel_D_0-1704223239776.png

 

Paid hours: 

Johel_D_1-1704223239773.png

 

Ratio calculated by Power BI using DIVIDE formula:

Calculate NLE = DIVIDE(SUM('Earn hours'[ Earn Hours]), SUM('Paid hours'[Hours]), BLANK())
 

Nov 15: 13.15 / 10.28 = 8.16%

Nov 16: 10.68 / 10.57 = 6.63%

Nov 17: 3.32 / 8.55 = 2.06%

Nov21: 2.95 / 10.25 = 1.83%

 

 

Ratio calculated by Power BI using that I currently have:

WCG NLE =DIVIDE(SUM('Earn hours'[ Earn Hours])AVERAGE('Paid hours'[Hours]))
 

Nov 15: 13.15 / 10.28 = 179.47%

Nov 16: 10.68 / 10.57 = 145.82%

Nov 17: 3.32 / 8.55 = 45.32%

Nov21: 2.95 / 10.25 = 40.29%

 

 

The result of this formula is a little bit closer but it is still off.

 

The results that I am expecting are: 

Nov 15: 13.15 / 10.28 = 127.9%

Nov 16: 10.68 / 10.57 = 101%

Nov 17: 3.32 / 8.55 = 38.8%

Nov21: 2.95 / 10.25 = 28.78%

 

The summaries in the tables "Earn hours" and "Paid hours" are correct, however, as you can see the calculations are incorrect.

Please let me know if this information is enough, the model comes from a huge database so I complicated to share a usefull model.

 

Thanks in advance for your help.

 

 

1 ACCEPTED SOLUTION
v-jialongy-msft
Community Support
Community Support

 Hi @ Johel_D

 

Based on your question, I have created the following two tables

vjialongymsft_0-1704263271275.png

 

vjialongymsft_1-1704263271276.png

 

Then you need to create a relationship for the two tables in the Model View

vjialongymsft_2-1704263287533.png

 

 

Then you can use your formula to get the results you want

 

Measure =

DIVIDE(

    SUM('Earn hours'[Earn Hours]),

    SUM('Paid hours'[Hours])

)

 

 

vjialongymsft_3-1704263299057.png

 

 

 

 

Best Regards,

Jayleny

 

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

1 REPLY 1
v-jialongy-msft
Community Support
Community Support

 Hi @ Johel_D

 

Based on your question, I have created the following two tables

vjialongymsft_0-1704263271275.png

 

vjialongymsft_1-1704263271276.png

 

Then you need to create a relationship for the two tables in the Model View

vjialongymsft_2-1704263287533.png

 

 

Then you can use your formula to get the results you want

 

Measure =

DIVIDE(

    SUM('Earn hours'[Earn Hours]),

    SUM('Paid hours'[Hours])

)

 

 

vjialongymsft_3-1704263299057.png

 

 

 

 

Best Regards,

Jayleny

 

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

avatar user

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

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

Feb2025 NL Carousel

Fabric Community Update - February 2025

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

Top Solution Authors (Last Month)
Top Kudoed Authors (Last Month)