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
zalalu
Frequent Visitor

KPI now showing correctly! Help!

This post has closed.

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

Hi  @zalalu ,

 

First in KPI table,create a column as below:

_Avg KPI per day =
IF (
    'KPI'[Avg KPI per day] = 0,
    CALCULATE (
        MAX ( 'KPI'[Avg KPI per day] ),
        FILTER (
            'KPI',
            'KPI'[Material Type] = EARLIER ( 'KPI'[Material Type] )
                && 'KPI'[Avg KPI per day] <> 0
        )
    ),
    'KPI'[Avg KPI per day]
)

Then in data table create a column as below:

KPI.Avg KPI per day =
LOOKUPVALUE (
    'KPI'[_Avg KPI per day],
    'KPI'[Site A], 'Data'[Site A],
    'KPI'[Site B], 'Data'[Site B],
    'KPI'[Material Type], 'Data'[Material Type],
    BLANK ()
)

And you will see:

vkellymsft_0-1629267649921.png

For the related .pbix file,pls see attached.

 

 

Best Regards,
Kelly

Did I answer your question? Mark my reply as a solution!

View solution in original post

1 REPLY 1
v-kelly-msft
Community Support
Community Support

Hi  @zalalu ,

 

First in KPI table,create a column as below:

_Avg KPI per day =
IF (
    'KPI'[Avg KPI per day] = 0,
    CALCULATE (
        MAX ( 'KPI'[Avg KPI per day] ),
        FILTER (
            'KPI',
            'KPI'[Material Type] = EARLIER ( 'KPI'[Material Type] )
                && 'KPI'[Avg KPI per day] <> 0
        )
    ),
    'KPI'[Avg KPI per day]
)

Then in data table create a column as below:

KPI.Avg KPI per day =
LOOKUPVALUE (
    'KPI'[_Avg KPI per day],
    'KPI'[Site A], 'Data'[Site A],
    'KPI'[Site B], 'Data'[Site B],
    'KPI'[Material Type], 'Data'[Material Type],
    BLANK ()
)

And you will see:

vkellymsft_0-1629267649921.png

For the related .pbix file,pls see attached.

 

 

Best Regards,
Kelly

Did I answer your question? Mark my reply as a solution!

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.

Top Solution Authors
Top Kudoed Authors