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
PPStar
Helper IV
Helper IV

Storing a value in a measure

Hello. 

 

I have the following table of data

PPStar_0-1686653973318.png

This table is created by dragging measures into the table, so for e.g. the value of the KPI is showing it in context to the month. 

 

I need a way to create a measure that dynamicaly stores the KPI value for the latest month that has a Percent Value. 

 

e.g. if i was to drag the kpi measure on a new table, it would show the value 3, as per my measure below

 

KP1  = IF(
                            AND([Column] >= 0.95, [Column] <= 1),
                            1,
                            IF(AND([Column] <= 0.94, [Column] >= 0.90),2,3))

 

I somehow need a way to store the value of KPI in a measure. 

I tried to create a measure to say, show me the max month where percent value is not blank, something 

 

if i use MAX (CalanderTable[Month].[Month] - This shows me the max value in the date table . This is not what i want. 

 

It has to be the latest KPI value where there is a percent calculation.

 

The reason i want this is to do conditional formatting using the KPI Visual under Trend Axis. If KPI is 1 then show this color etc. 

 

Hope that makes sense. 

 

1 REPLY 1
lbendlin
Super User
Super User

Measures do not store anything. They are ephemeral.

 

Please provide sample data (with sensitive information removed) that covers your issue or question completely, in a usable format (not as a screenshot).
https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-...
Please show the expected outcome based on the sample data you provided.

https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447...

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.