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

how to show formula in a KPI

hi, 

im trying to display a formula in a KPI chart in my power bi app.

the calculation is the Max number of my "ID" column divided by a static number.

i have 2 questions;

how would i include a static number in my dataset? im used to using qlik where you can define a variable and then call that variable in the calucaltion, is there a similar method in power bi?

2. how would i show the calucaltion in a KPI/text box?

i.e something like this is what i want to display:

Marko64_0-1658221626312.png

where 170 is the max number of my ID column and 317 is a static number that can be updated manually.

thanks!

 

 

1 ACCEPTED SOLUTION
Avantika-Thakur
Solution Supplier
Solution Supplier

Hi @Anonymous ,

You will be required to create below 3 measure :

1) Max of ID = MAX('Table'[ID]) -> This will give you the maximum value from ID column

2) Static value = 317  -> This will store a static value as per your requirement

3) Calculation = CONVERT([Max of ID],STRING)&"/"&CONVERT([Static value],STRING) -> This will help you show the calculation in KPI card/textbox as below -
Image 2.JPG

Please accept the solution if this answers your query.

 

Thanks!

Avantika

View solution in original post

1 REPLY 1
Avantika-Thakur
Solution Supplier
Solution Supplier

Hi @Anonymous ,

You will be required to create below 3 measure :

1) Max of ID = MAX('Table'[ID]) -> This will give you the maximum value from ID column

2) Static value = 317  -> This will store a static value as per your requirement

3) Calculation = CONVERT([Max of ID],STRING)&"/"&CONVERT([Static value],STRING) -> This will help you show the calculation in KPI card/textbox as below -
Image 2.JPG

Please accept the solution if this answers your query.

 

Thanks!

Avantika

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.