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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

KPI now showing correctly! Help!

This post has closed.

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

Hi  @Anonymous ,

 

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  @Anonymous ,

 

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
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors