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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
eiprakash
Frequent Visitor

Create Measure on chart

I have the following structure. 2 tables - Hires and Employee connected by a key. 

 

I would like to create a ratio field = Count of hires / Count of Employee.

 

I am a Qlikview user moving to PowerBI. In Qlikview i was able to create these expressions in chart or text box. I would like to understand how it is being done in PowerBI

1 ACCEPTED SOLUTION

Hi @eiprakash,

You could refer to below fomula:

Hiring Rate = CALCULATE(COUNT(Table1[EmpNo.Hires]))/CALCULATE(COUNT(Table2[EmpNo.Active]))

Result:

1.PNG

You can also download the PBIX file to have a view.

 https://www.dropbox.com/s/nm5gdnymrb3ma2v/Create%20Measure%20on%20chart.pbix?dl=0

 

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.

View solution in original post

6 REPLIES 6
v-danhe-msft
Employee
Employee

Hi @eiprakash,

Could you mean show the formula in the visual? If so, I am afraid you could not achieve this feature currently, but you could add a text box beside the visual:

1.PNG

If I misunderstand you, please let me know as soon as possible.

 

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.

Greatly appreciate your help !!Below would be the Mock up data. Table A and B are connected using the Key Cost Center. I would like to calculate Hiring rate as a measure.

 

Hiring Rate = Count of EmpNo.Hires (From TableA)  / Count of EmpNo.Active(From TableB) = 3/5 (Answer)

 

Table A:

 

EmpNo. Hires    CostCenter

2                         234

3                         235

4                         236

 

Table B:

 

EmpNo. Active    CostCenter

5                         234

4                        235

7                         236

9                        232

2                        231

Hi @eiprakash,

You could refer to below fomula:

Hiring Rate = CALCULATE(COUNT(Table1[EmpNo.Hires]))/CALCULATE(COUNT(Table2[EmpNo.Active]))

Result:

1.PNG

You can also download the PBIX file to have a view.

 https://www.dropbox.com/s/nm5gdnymrb3ma2v/Create%20Measure%20on%20chart.pbix?dl=0

 

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.

Thanks much

 

@Anonymous check this out

Thejeswar
Resident Rockstar
Resident Rockstar

Hi,

Can you give some sample mocked-up data of your tables...and the key name using which they are connected

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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